Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Design suggestions #911

Open
Nuxssss opened this issue Apr 17, 2021 · 0 comments
Open

Design suggestions #911

Nuxssss opened this issue Apr 17, 2021 · 0 comments

Comments

@Nuxssss
Copy link
Contributor

Nuxssss commented Apr 17, 2021

let io @ { ? } = import! std.io
let random = import! std.random
let int = import! std.int
let string = import! std.string
let { Result } = import! std.result

do _ = io.println "Guess a number between 1 and 100!"
do target_number = random.thread_rng.gen_int_range 1 101

why not

import! io @ { ? } = std.io
import! random = std.random
import! int = std.int
import! string = std.string
import! { Result } = std.result

do! io.println "Guess a number between 1 and 100!"
let! target_number = random.thread_rng.gen_int_range 1 101

I think it will be like F# computation expressions
What do you think about it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant