-
Notifications
You must be signed in to change notification settings - Fork 6
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
pattern matching IO? #8
Comments
Indeed an IO.map2 would be nice. ioMap2 combineAB ioA ioB =
ioA |> IO.andThen (\a -> IO.andThen (\b -> combineAB a b))
-- in
ioMap2
(\a b -> yourFunction a b)
(File.open "a.txt" |> IO.exitOnError identity)
(File.open "b.txt" |> IO.exitOnError identity) |
Thank you. I also just succeeded ... because I just discovered the new-api branch of this repo. The instructions in the readme:
gives me the older version. What is the correct way to install the new elm-posix branch? |
Pretty sure the author didn't publish it yet. |
pardon my ignorance, but what is 'vendor' as a verb? |
haha I'm not a native speaker but as I understood it it basically means copy it to your project directly and build/link/... it there with your project |
Hello,
Is there any way I can use pattern matching to get a
String
from anIO String
? I've tried, but the deeper I dig the more confused I get.Relatedly, is there a way to have a
map2
for IO? and a functionIO ( IO a)) -> IO a
?I apologise if these are easy questions. I am new at elm and got confused.
The context is that I have a function
String -> String -> String
and I want to read the first two arguments from a text file.Or is there maybe even an "evil" way to just read in a String instead of IO String from a text file ?
The text was updated successfully, but these errors were encountered: