http://doc.ubuntu-fr.org/tutoriel/comment_transformer_un_programme_en_service
Saturday, February 28, 2015
Monday, January 26, 2015
Discovering Monads
There is plethora of tutorials on Monads.
What if for the initiation, simply expose the code without naming anything, neither
documenting.
Let us, just read the code and try to understand.
Links
http://www.javascriptoo.com/monad-js
http://modernjavascript.blogspot.fr/2013/06/monads-in-plain-javascript.html
https://github.com/scottburch/functional
What if for the initiation, simply expose the code without naming anything, neither
documenting.
Let us, just read the code and try to understand.
function init(v) {
return function() {
return v;
}
}
function bind(wv, fn) {
return fn(wv())
}
function addOne(x) {
return x + 1
}
function mul2(x) {
return x * 2
}
function sqrt(x) {
return Math.sqrt(x)
}
function lift(f) {
return function (val) {
return init(f(val))
}
}
function execute(lstf, value) {
var nlstf = lstf.map(lift)
return (nlstf.reduce(bind,init(value)))()
}
var result = execute([addOne,sqrt,mul2],5)
Links
http://www.javascriptoo.com/monad-js
http://modernjavascript.blogspot.fr/2013/06/monads-in-plain-javascript.html
https://github.com/scottburch/functional
Monday, January 19, 2015
Recursive Functional State Machine
https://code.activestate.com/recipes/577709-recursive-functional-state-machine/?in=lang-python
Here is a pure Python FSM
https://github.com/oxplot/fysom/blob/master/fysom.py
Here is a pure Python FSM
https://github.com/oxplot/fysom/blob/master/fysom.py
Wednesday, November 26, 2014
Monad syntax for JavaScript
Tuesday, November 25, 2014
Programmer en ECMAScript 6 aujourd’hui
Tutoriel montrant comment utiliser Javascript 6 dès aujourd'hui
http://www.technologies-ebusiness.com/langages/programmer-ecmascript-6-aujourdhui-1
http://www.technologies-ebusiness.com/langages/programmer-ecmascript-6-aujourdhui-1
Subscribe to:
Posts (Atom)