mirror of
https://github.com/roc-lang/roc.git
synced 2024-09-20 15:27:45 +03:00
Rename test.roc to Example.roc
This commit is contained in:
parent
1c7595c678
commit
d743818f74
@ -1,3 +1,15 @@
|
||||
Example exposes [ program ]
|
||||
|
||||
program =
|
||||
after (echo "What is your first name?"), ({}) ->
|
||||
after readInput, (firstName) ->
|
||||
after (echo "Hi, \(firstName)! What is your last name?"), ({}) ->
|
||||
after readInput, (lastName) ->
|
||||
echo "Your full name is: \(firstName) \(lastName)"
|
||||
|
||||
|
||||
# In the future, everything below here will be in a platform.
|
||||
|
||||
succeed = (val) ->
|
||||
Success val
|
||||
|
||||
@ -53,13 +65,3 @@ fallback = (task, onFailure) ->
|
||||
(ioErr -> fallback (prevOnFailure ioErr), onFailure),
|
||||
(str -> fallback (cont str), onFailure)
|
||||
|
||||
|
||||
demo =
|
||||
after (echo "What is your first name?"), ({}) ->
|
||||
after readInput, (firstName) ->
|
||||
after (echo "Hi, \(firstName)! What is your last name?"), ({}) ->
|
||||
after readInput, (lastName) ->
|
||||
echo "Your full name is: \(firstName) \(lastName)"
|
||||
|
||||
|
||||
demo
|
Loading…
Reference in New Issue
Block a user