👋 Hello World
The classic Hello World program in Unison is as simple as a call to printLine.
{IO, Exception}
indicates which abilities the program needs to do I/O and throw exceptions.
'
Distributed map-reduce
With a few lines of code, you can perform a distributed map-reduce using theRemote
ability.
Learn more about Remote and working withdistributed datasets in Unison.
HTTP request
Perform effectful code, like HTTP requests withAbilitiesandAbility handlers.
Checkout more HTTP examples in thestew.http library.
httpEx : '{IO, Exception} Response
httpEx _ =
host = HostName "unison-lang.org"
web = Authority None host None
path = Path.root / "learn"
uri = Uri.Uri Scheme.https (Some web) path http.Query.empty None
req = Request.get uri
handle http.Http.request req with http.Http.handler