Code from article: FRP in Javascript