Author | Message |
---|---|
rabbott
Posts: 1649
|
Posted 15:18 Oct 28, 2016 |
Because lambda functions are so central to functional programming, I've re-expressed many of the TicTacToe and TicTacToeHistory programs as lambda functions. This doesn't change anything about the types of the functions or how they work. The idea is to illustrate that functions can be defined independently of assigning names to them. In functions whose definitions depended on guards or patterns I could not re-write the functions without more significant changes, which I didn't make. I was unable to re-write minimax as a lambda function. This had nothing to do with guards or patterns. Do you see why? Try it and find out. Just noticed that the same problem arises with the replace function.
Last edited by rabbott at
19:00 Oct 28, 2016.
|
rabbott
Posts: 1649
|
Posted 19:09 Oct 28, 2016 |
I converted
which didn't load, to
Can you see what the issue is? |