mirror of
https://github.com/unisonweb/unison.git
synced 2024-11-14 07:51:12 +03:00
30 lines
575 B
Plaintext
30 lines
575 B
Plaintext
-- a comment
|
|
{- {-
|
|
a multi-line nested comment
|
|
-} still a comment
|
|
-}
|
|
|
|
type Optional a = None | Some a
|
|
|
|
Optional.isEmpty : ∀ a . Optional a -> Boolean
|
|
Optional.isEmpty o = case o of
|
|
Optional.None -> true
|
|
Optional.Some hi@_ -> false
|
|
|
|
|
|
(|>) : forall a b . a -> (a -> b) -> b
|
|
a |> f = f a
|
|
|
|
let
|
|
foo : UInt64 -> UInt64
|
|
foo x = case if x >_UInt64 1 then x +_UInt64 1 else 0
|
|
x = [1.,2.5]
|
|
"let case if"
|
|
|> Text.size
|
|
|> Stream.from-int64
|
|
|> Stream.take 10
|
|
|> Stream.fold-left -0 (+_Int64)
|
|
|> Stream.fold-left-0 (+_Int64)
|
|
|> Optional.Some
|
|
+1.0
|