-
Notifications
You must be signed in to change notification settings - Fork 0
Pull
Sxtanna edited this page Jul 9, 2020
·
3 revisions
pull{::['type']}{("'text prompt'")}
pull
- Pull statements begin with the pull keyword.
- type (optional)
- Pull statements can define a specific required type.
- If the type does not match, the program will attempt to read input until it does.
- text prompt (optional)
- Pull statements support printing a prompt before accepting input.
val anyInput = pull // will accept any value, and will store it as a string
val intInput = pull::[Int]("please enter an integer: ")
push "You entered $intInput"