This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { addTickerForm } from '../../higherOrderComponents/addTickerForm' | |
| console.log(addTickerForm) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var Monad = function(x) { | |
| this.value = x | |
| } | |
| Monad.prototype.of = function(x) { | |
| return new Container(x) | |
| } | |
| Monad.prototype.isNothing = function() { | |
| return (this.__value === null || this.__value === undefined) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var Container = function(x) { | |
| this.value = x | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //not pointfree because we mention the data: word | |
| const snakeCase = word => word.toLowerCase().replace(/\s+/ig, '_') | |
| //pointfree | |
| const snakeCase = compose(replace(/\s+/ig, '_'), toLowerCase) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const compose = () => { | |
| const fns = arguments | |
| return result => { | |
| for (var i = fns.length - 1; i > -1; i--) { | |
| result = fns[i].call(this, result) | |
| } | |
| return result | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var input = [ | |
| { | |
| title: "Batman Begins", | |
| year: 2005, | |
| cast: [ | |
| "Christian Bale", | |
| "Michael Caine", | |
| "Liam Neeson", | |
| "Katie Holmes", | |
| "Gary Oldman", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function foo(bar) { | |
| } | |
| function foo(bar) { | |
| var _bar = bar | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Planes |