Some experimental operators for working with lists
Append the item on the RHS to the end of the list on the LHS
[1]
|:: 2
--> [1,2]
[1]
|:: 2
|:: 3
--> [1,2,3]Wrap LHS in a list, then append RHS list to it; equivalent to ::, but
left-associative with precedence set to 0 (same as |>)
("a" ++ "b")
:: ["cd","ef"]
--> ["ab","cd","ef"]
"a" ++ "b"
:: ["cd","ef"]
--> ERROR
"a" ++ "b"
:|++ ["cd","ef"]
--> ["ab","cd","ef"]Wrap LHS in a list, then append the item on RHS to the list
1
:|:: 2
--> [1,2]Forward operator for List.map
[ 1
, 4
, 9
]
.|> sqrt
--> [1,2,3]Wrap LHS in a list, then apply RHS function
1
:|> List.head
--> Just 1
Append the RHS to the end of the LHS; equivalent to
++, but left-associative with precedence set to0(same as|>)