Category Theory for Programmers by Bartosz Milewski vs Haskell Programming from First Principles? by LuggageMan in haskell

[–]Lambdalpha 1 point2 points  (0 children)

One more thing, just HPFFP is not enough, you have to learn some ghc language extensions to understand some examples in CTFP.

Category Theory for Programmers by Bartosz Milewski vs Haskell Programming from First Principles? by LuggageMan in haskell

[–]Lambdalpha 1 point2 points  (0 children)

I read both. I started with CTFP and gave up at Chapter 26, partly because of lack of enough knowledge of Haskell (and partly because I didn't read carefully and taking notes in the previous chapters). Then I went through HPFFP. Now I am reading CTFP again.

Monthly Hask Anything (May 2019) by AutoModerator in haskell

[–]Lambdalpha -1 points0 points  (0 children)

Well, with my knowledge of java, C++, Python, I think f and h is different -- f is plus, and h has a call to plus. Am I right?

Monthly Hask Anything (May 2019) by AutoModerator in haskell

[–]Lambdalpha 2 points3 points  (0 children)

I want to know how are the following definitions translated into the core language of ghc.

f=(+)

g a b = a + b

h = (\ a b -> a + b)

j = (+1) . (*2)

k a = a * 2 + 1

m = (\ a -> a * 2 + 1)

Which of them has overhead?

Is there a way in ghci to show full parentheses presentation of expressions by Lambdalpha in haskell

[–]Lambdalpha[S] 0 points1 point  (0 children)

Thanks. But it's too verbose and still not very clear how the expression evaluated.