Advice on Learning “How to Think Functional”?

后端 未结 5 2032
慢半拍i
慢半拍i 2021-01-31 11:56

As a newbie in functional languages (I started touching Erlang a couple of weeks ago -- the first functional language I could get my hands on).

I started to writing some

5条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-31 12:43

    It’s import to get used to thinking that data can be used as code, and vice versa.

    Usually you construct a program (data) using several primitive operations (folding, nesting, threading, distributing, ..., and some are generalized inner product, outer product, etc.), and use this program (data) to manipulate other data.

    After a while, I found that functional programming […] encourages a "top down" design.

    I agree.

提交回复
热议问题