I am trying to convert scheme code to Haskell code.
For that, I want know how to use scheme’s
- map
- lambda
- return port from file path
- read-line from port
- append to list
- regexp-match
- GUI
in Haskell
could somebody tell me how to do this in haskell?
thanks
Essentially you need to learn Haskell, the language, and its library ecosystem. To find libraries and functions, start by learning the
Prelude, since many things are defined there. Then move on to Hackage, where you have thousands of libraries to pick from.Specifically, most of what you need can be found in the Prelude, and via Hoogle.
mapis defined.“lambda” is the syntax:
\x -> ... e ...“return port from file path”: try
openFile“read-line from port”, try
hGetLine“append to list”, try
++“regexp-match”, use one of the fine regex libraries from Hackage.
“GUI”, pick one of gtk2hs or wxHaskell.