mirror of
https://github.com/unisonweb/unison.git
synced 2024-09-11 02:25:39 +03:00
419 B
419 B
scratch/main> builtins.merge
structural ability Ask where ask : Nat
ability Zoot where
zoot : Nat
Ask.provide : '{Zoot} Nat -> '{Ask} r -> r
Ask.provide answer asker =
h = cases
{r} -> r
{Ask.ask -> resume} -> handle resume !answer with h
handle !asker with h
dialog = Ask.provide 'zoot '("Awesome number: " ++ Nat.toText Ask.ask ++ "!")
> dialog