---
# System prepended metadata

title: Untitled

---

jadi si `<$>` infix operator namanya, dan itu didefinisiin di `ReUtils.Option.Infix` om, gini definisinya:

```
let (<$>) = Belt.Option.map;

```

di mana si `Belt.Option.map` itu didefinissin sebagai ini:
```
val map : 'a option -> ('a -> 'b) -> 'b option

```
map optionValue f
If optionValue is Some value, returns Some (f value); otherwise returns None

```
Belt.Option.map(Some 3, x => x * x) = (Some 9);
Belt.Option.map(None, x => x * x) = None;
```
atau yang di atas bisa dibikin kayak gini:

```
Some(3) <$> x => x * x = Some 9
None <$> x => x * x = None
```

nah, kalo `<$>` dikombinasiin sama `|?`, bisa jadi kayak 
`Belt.Option.mapWithDefault`:
`mapWithDefault optionValue default f`
If optionValue is Some value, returns f value; otherwise returns default
```
Belt.Option.mapWithDefault(Some(3), 0, x => x + 5); // 8
Belt.Option.mapWithDefault(None, 0, x => x + 5); // 0
```
yang di atas sama kayak:

```
Some(3) <$> x => x + 5 |? 0; // 8
None <$> x => x + 5 |? 0; // 0
```