Z
Z
zergon3212017-01-20 20:20:05
Haskell
zergon321, 2017-01-20 20:20:05

What is the theoretical background needed to do functional programming in Haskell?

I want to master a fully functional programming language, I settled on Haskell. For him, it seems like a large theoretical base is needed. What exactly do I need to learn in order to roll?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Daniil Kolesnichenko, 2017-01-20
@zergon321

[Haskell] seems to need a large theoretical base
This is not entirely true. When you count the change in a store, you hardly think that the sets you use to count the little things (the set of natural numbers, integers, etc.) with the operations specified on these sets (addition, multiplication, etc. .) form various algebraic structures (all sorts of rings, semigroups, fields, etc.). Moreover, even if you thought about it, it would not help to calculate the change in any way.
It’s almost the same with Haskell’s theoretical bez - Haskell actively uses concepts from category theory (categories, arrows, monads, functors, etc.), but to use these concepts within Haskell, it is enough (at least at first) to consider them just like FP patterns (similar to OOP patterns, such as facade, singleton, adapter, and that's it). Thus, a monad is simply a type that has a certain set of "methods" (in terms of OOP) that satisfy certain requirements.
In general, to start learning Haskell, I tell you, you don’t need a special theoretical background. In the first steps, all you need to understand is currying, FVP, lambdas, laziness. These are all fairly simple things, chewed at the beginning of any book on functional programming. Well, if suddenly, when you come across the concept of "monad", you want to know what it means outside of Haskell, where it came from - no one bothers to read an article / chapter of a book about TC when you need it, it is not necessary to do it in advance.

S
Stanislav Morozov, 2017-01-25
@morozik1990

Well, if you are used to thinking in cycles and iterations, then you will have to learn to think in recursions.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question