I hereby claim:
- I am miwillhite on github.
- I am mwillhite (https://keybase.io/mwillhite) on keybase.
- I have a public key ASAvBE9hF9gAxNjmuh0Ixd5nS7rNvLyZC8aWYzCroFR5tAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| /* | |
| JavaScript | |
| There are 2 files. | |
| 1) The ADT definition. | |
| Here we define the data constructors, their properties and the | |
| implemenations (or "instances") of the various methods, in this | |
| case "concat". |
| Node { | |
| type: 'BlockStatement', | |
| start: 1059, | |
| end: 1171, | |
| loc: | |
| SourceLocation { | |
| start: Position { line: 32, column: 50 }, | |
| end: Position { line: 40, column: 1 } }, | |
| range: [ 1059, 1171 ], | |
| body: |
| // :: ReactComponent -> ReactComponent -> ReactComponent | |
| const concatR = A => B => | |
| ({ ...props, children }) => | |
| <> | |
| <A { ...props } { ...children } /> | |
| <B { ...props } { ...children } /> | |
| </> | |
| // :: ReactComponent | |
| const EmptyComponent = <></>; |
| import { async, hold } from 'most-subject'; | |
| import reducer from './reducer'; | |
| const initialState = {}; | |
| // :: AsyncSubject | |
| const store = hold(1, async()); | |
| // :: Action -> () | |
| export const next = store.next.bind(store); | |
| // :: AsyncSubject State | |
| export const state = store.scan(reducer, initialState); |
An introduction to functional thinking with examples in JavaScript.
https://medium.com/@chetcorcos/functional-programming-for-javascript-people-1915d8775504#.p0hyzlyjq
A soft, informal introduction to the Fantasy Land spec.
https://james-forbes.com/?/posts/the-perfect-api
| const daggy = require('daggy'); | |
| const R = require('ramda'); | |
| const Future = require('fluture'); | |
| const S = require('sanctuary'); | |
| const { Left, Right, Either } = S; | |
| const Answer = daggy.taggedSum({ | |
| Pure: ['value'], | |
| Addressable: ['street', 'city', 'postal_code', 'state'], // Address | |
| Contactable: ['contact_uid'], // Participant and Relationship |
| var store = new TaskStore(reducer, actions.init({ | |
| tasks: { | |
| incomplete: incompleteTasks, | |
| complete: completedTasks, | |
| }, | |
| })); | |
| store.state.observe(function (state) { console.log(state) }); |
| import * as fs from 'fs'; | |
| import { | |
| always, append, apply, compose, complement, equals, flip, head, ifElse, inc, indexOf, | |
| length, lift, lt, map, range, reduce, reduced, reject, split, sum, tail, take, test | |
| } from 'ramda'; | |
| // Get the words list and create an array, rejecting anything with apostrophes | |
| const words = compose( | |
| reject(test(/'/)), | |
| split('\n'), |
| # In my init/setup | |
| // Register the header | |
| [self.collectionView registerClass:[DummyView class] | |
| forSupplementaryViewOfKind:UICollectionElementKindSectionHeader | |
| withReuseIdentifier:kJJUserJujuLibraryHeaderIdentifier]; | |
| # This is being called | |
| - (CGSize)collectionView:(UICollectionView *)collectionView | |
| layout:(UICollectionViewLayout *)collectionViewLayout |