My efforts to port http://www.youtube.com/watch?v=f6kdp27TYZs to Clojure.
func boring(msg string) {
for i := 0; ; i++ {
fmt.Println(msg, i)
time.Sleep(time.Second)
}
My efforts to port http://www.youtube.com/watch?v=f6kdp27TYZs to Clojure.
func boring(msg string) {
for i := 0; ; i++ {
fmt.Println(msg, i)
time.Sleep(time.Second)
}
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
#!/usr/bin/python | |
# encoding: utf-8 | |
# | |
# Copyright (c) 2013 deanishe@deanishe.net. | |
# | |
# MIT Licence. See http://opensource.org/licenses/MIT | |
# | |
# Created on 2013-11-01 | |
# |
In PureScript there are types of different kinds. Kinds are types for types. For example Int
has kind Type
, and we write it as Int :: Type
. You can ask for the kind of a type in purs psci
> :k Int
Type
Type constructors take types to other types. For example Array
(which still needs another type to form a type a value could have, like Array Int
):
const compose = (f, g) => x => f(g(x)) | |
const Id = x => | |
({ | |
fold: f => f(x), | |
map: f => Id(f(x)) | |
}) | |
Id.of = Id | |
const Tuple = (_1, _2) => |