“Why Functional Programming Matters” by John Hughes.
https://www.cs.kent.ac.uk/people/staff/dat/miranda/whyfp90.pdf.
https://blog.acolyer.org/2016/09/14/why-functional-programming-matters/
“The Design of a Pretty-printing Library” by John Hughes.
| /* | |
| https://fullstack.pupilfirst.org | |
| https://github.com/nseadlc-2020/package-todo-cli-task/tree/master/shared | |
| */ | |
| const EOL = require('os').EOL | |
| const fs = require('fs') | |
| const PENDING_TODOS_FILE = 'todo.txt' | |
| const COMPLETED_TODOS_FILE = 'done.txt' |
| #ifndef __MPMC_RING_H__ | |
| #define __MPMC_RING_H__ | |
| /** | |
| * Inspired by 'An Interesting Lock-free Queue' | |
| * Talk by Tony Van Eerd at the CppCon 2017: | |
| * https://www.youtube.com/watch?v=HP2InVqgBFM | |
| * Author: Lucas Crämer | |
| * */ |
“Why Functional Programming Matters” by John Hughes.
https://www.cs.kent.ac.uk/people/staff/dat/miranda/whyfp90.pdf.
https://blog.acolyer.org/2016/09/14/why-functional-programming-matters/
“The Design of a Pretty-printing Library” by John Hughes.
| type json = Js.Json.t; | |
| let x: json = [%bs.raw {|{"a": [1, "hello", 2, {"b": {"c": [100,200, "d", [10,20,30]]}}]}|}]; | |
| let rec json_to_string json => { | |
| let array_to_string a => a |> Array.to_list |> String.concat ","; | |
| let emitObject o => | |
| "{" ^ | |
| { | |
| let emitKV (key, value) => key ^ ": " ^ json_to_string value; |