You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
evaluate:Boolean->Boolevaluate boolean =case boolean ofLiteral bool ->
bool
Not b ->
not (evaluate b)And b b' ->
evaluate b && evaluate b'
Or b b' ->
evaluate b || evaluate b'
evaluate :: Boolean -> Bool
evaluate value =
case value of:
Literal a ->
a
Not a ->
not (evaluate a)
And a b ->
evaluate a && evaluate b
Or a b ->
evaluate a || evaluate b
maybe_to_list : Maybe a -> List a
maybe_to_list maybe =
maybe
|> Maybe.map (List.repeat 1)
|> Maybe.with_default []
Lambda Functions
xs
|> map parse_item
|> filter do
| Some x -> x % 5 == 0
| None -> false
end
|> take
|> fold (+) 0
do Some x -> x
| None -> 0
end
fun | pat => e
| pat2 => e
....|