mirror of
https://github.com/unisonweb/unison.git
synced 2024-11-14 16:28:34 +03:00
18 lines
342 B
Plaintext
18 lines
342 B
Plaintext
|
|
type Optional a = None | Some a
|
|
|
|
Optional.isEmpty : ∀ a . Optional a -> Boolean
|
|
Optional.isEmpty o = case o of
|
|
Optional.None -> true
|
|
Optional.Some _ -> false
|
|
|
|
increment x = x +_UInt64 1
|
|
|
|
(|>) : forall a b . a -> (a -> b) -> b
|
|
a |> f = f a
|
|
|
|
Stream.from-int64 -3
|
|
|> Stream.take 10
|
|
|> Stream.fold-left +0 (+_Int64)
|
|
|> Optional.Some
|