arliss_obsidian/fp/Language/Infix Operators/Common Operators/Data.md

15 lines
1.9 KiB
Markdown
Raw Normal View History

2024-09-23 23:56:55 +00:00
|Operator|Description|Associativity|Precedence|Defined As|
|--|--|--|--|--|
|`<>`|append|right|5|[`Data.Semigroup.append`](https://pursuit.purescript.org/packages/purescript-prelude/docs/Data.Semigroup#v:(%3C%3E))|
|`<$>`|map|||
|`<#>`|flipped map|||
|`<*>`|apply (map using function of 2+ arguments)|||
|`>>=`|bind|left|1|[`Control.Bind.bind`](https://pursuit.purescript.org/packages/purescript-prelude/docs/Control.Bind#v:(%3E%3E=))|
|`=<<`|flipped bind|right|1|[`Control.Bind.bindFlipped`](https://pursuit.purescript.org/packages/purescript-prelude/docs/Control.Bind#v:(=<<))|
|`>=>`|point-free bind (kleisli composition)|right|1|[`Control.Bind.composeKleisli`](https://pursuit.purescript.org/packages/purescript-prelude/docs/Control.Bind#v:(>=>))|
|`<=<`|flipped point-free bind|right|1|[`Control.Bind.composeKleisliFlipped`](https://pursuit.purescript.org/packages/purescript-prelude/docs/Control.Bind#v:(<=<))|
|<code>&lt;&vert;&gt;</code>|Monadic "or;" try left, if bad then use right|right|3|[`Control.Alternative.alt`](https://pursuit.purescript.org/packages/purescript-control/docs/Control.Alt#v:(%3C%7C%3E))|
|`*>`|"evaluate left, then discard its return value and evaluate right"|left|4|[`Control.Apply.applySecond`](https://pursuit.purescript.org/packages/purescript-prelude/docs/Control.Apply#v:(*>))|
|`<*`|"evaluate left, then evaluate right and continue with the value left returned"|left|4|[`Control.Apply.applyFirst`](https://pursuit.purescript.org/packages/purescript-prelude/docs/Control.Apply#v:(<*))|
|`$>`|"evaluate left, then discard its return value and continue with value"|left|4|[`Data.Functor.voidLeft`](https://pursuit.purescript.org/packages/purescript-prelude/docs/Data.Functor#v:(<$))
|`<$`|"evaluate right, then discard its return value and continue with value"|left|4|[`Data.Functor.voidRight`](https://pursuit.purescript.org/packages/purescript-prelude/docs/Data.Functor#v:($>))