This file contains 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 { | |
Async, constant, curry, | |
mapReduce, maybeToAsync, | |
safe | |
} = require('crocks') | |
// FileAsync :: Async Error String | |
// access :: (String, Number) -> Async Error () | |
const access = |
This file contains 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
/* Assuming: */ | |
{ | |
user: 1, | |
paymentMethod: 3 | |
item: 51, | |
date: 1481892890, /* epoch timestamp */ | |
payments: [{ | |
payment: 44, | |
amountCents: 400, |