Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
The functions
catstrandcatstr'defined in Haskell are equivalent, but the Scala code defines two functions (named the same,catstr?) that are not equivalent, despite what the text says. The proposed changes are about code snippets 3, 4, and 5. The first Scala definition should perhaps becomeThe second definition could become
The third snippet is then
and then indeed the definition of
greetcan use eithercatstrorcatstr2interchangeably, just like in the Haskell code.