This comes from an exercise in book *Haskell from First Principles*. The exercise is to implement `Applicative` for `ZipList'`, which is analogous to the Prelude's `ZipList`. The book has this hint

> 
> Check Prelude
>  for functions that can give you what you need. One starts
>  with the letter `z`, the other with the letter `r`. You’re looking
>  for inspiration from these functions, not to be able to directly
>  reuse them as you’re using a custom `List` type, not the 
>  `Prelude` provided list type.
> 
> 
> 

I guessed the function that starts with `z` is `zipWith`, but I do not know about a function that starts with `r`.

```
data List a =
    Nil
  | Cons a (List a)
  deriving (Eq, Show)

zipWith' :: (a -> b -> c) -> List a -> List b -> List c
zipWith' _ Nil _ = Nil
zipWith' _ _ Nil = Nil
zipWith' f (Cons x xs) (Cons y ys) = Cons (f x y) (zipWith' f xs ys)

newtype ZipList' a = ZipList' (List a)
  deriving (Eq, Show)

instance Functor ZipList' where
  fmap f (ZipList' xs) = ZipList' $ fmap f xs

instance Applicative ZipList' where
  pure x = ZipList' $ Cons x Nil
  (ZipList' fs) <*> (ZipList' xs) = ZipList' $ zipWith' ($) fs xs

```

This passes a test case in the book, but I am wondering if there's a better way to implement it since I did not use a function that starts with `r`. I have a feeling this was supposed to be `repeat` because it's also supposed to work over infinite lists.
['https://Stackoverflow.com/questions/58593349', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/4281998/']
Using a combination of `ADDRESS` and `MATCH` should help:

```
=ADDRESS(MATCH(YEAR(L12),Table!$A$1:$A$26,0),MATCH(MONTH(L12),Table!$A$1:$M$1,0))

```

[![enter image description here](https://i.stack.imgur.com/9i3DR.png)](https://i.stack.imgur.com/9i3DR.png)

Table:

[![enter image description here](https://i.stack.imgur.com/mK5Lr.png)](https://i.stack.imgur.com/mK5Lr.png)
I always suggest using `INDEX`/`MATCH` instead of `VLOOKUP`.

`INDEX`/`MATCH` can do everything `VLOOKUP` (and `HLOOKUP`) can do but it is:

* faster (important when used in many cells);
* more versatile (the value you are looking up does not need to be in a column to the right);
* more robust (inserting columns does not break it);
* easier to use (no column counting required);

If you used an `INDEX`/`MATCH` formula, such as this:

```
=INDEX(Table!$B$4:$M$65,MATCH(YEAR(L12),Table!$A$4:$A$65,0),MATCH(MONTH(L12),Table!$B$3:$M$3,0))

```

You could put it straight into a `CELL` function to return the full address:

```
=CELL(
    "address",
    INDEX(Table!$B$4:$M$65,MATCH(YEAR(L12),Table!$A$4:$A$65,0),MATCH(MONTH(L12),Table!$B$3:$M$3,0))
)

```

Example Table:
[![enter image description here](https://i.stack.imgur.com/cJPDf.png)](https://i.stack.imgur.com/cJPDf.png)

Example Result:
[![enter image description here](https://i.stack.imgur.com/LFpGU.png)](https://i.stack.imgur.com/LFpGU.png)

**AUTOMATICALLY COLOUR THE VALUE IN THE TABLE**

You do not need the address to highlight the value in the table.
Just create a conditional formatting rule for `$B$4:$M$65`:

```
=AND(MONTH(Sheet2!$L$12)=B$3,YEAR(Sheet2!$L$12)=$A4)

```

[![enter image description here](https://i.stack.imgur.com/TIpZ1.png)](https://i.stack.imgur.com/TIpZ1.png)