We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
?
The code below should work:
app [main!] { pf: platform "https://github.com/roc-lang/basic-cli/releases/download/0.19.0/Hj-J_zxz7V9YurCSTFcFdu6cQJie4guzsPMUi5kBYUk.tar.br" } import pf.Arg import pf.Stdout parse_arg = |arg| { after, before } = Str.split_first(arg, ".")? Ok (Str.to_dec(before)?, Str.to_dec(after)?) main! : List Arg.Arg => Result {} [Exit I32 Str] main! = |args| args |> List.map(Arg.display) |> List.map_try(parse_arg) ? |_| Exit 1 "Invalid arg" |> List.for_each! |(day, sub)| Stdout.line! "Solving problem forday ${Num.to_str day} sub ${Num.to_str sub}" ?? {} |> Ok
But for now it returns an error:
The map_try function expects 2 arguments, but it got only 1: 14│ |> List.map_try(parse_arg) ^^^^^^^^^^^^
Useful context: #7530
zulip discussion
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The code below should work:
But for now it returns an error:
Useful context: #7530
zulip discussion
The text was updated successfully, but these errors were encountered: