Drew Tipson
Feb 6, 2017 · 2 min read
[yourObject]
.map(function1)
.map(function2)
.map(function3)[0]
yourObject => function3(function2(function1(yourObject)))//orcompose(function3, function2, function1)
//pure description of the operation
completeOperation = Task.of(yourObject)
.map(function1)
.map(function2)
//...
.chain(data=>Task.post('/smsRoute',{data}));
//actually running the side-effecting operation
completeOperation.fork(handleError, reactToResponse)
over(
compose(L.user,L.name),
name=>name.toUpperCase(),
someBigObjectIncludingAUser
)
//orusernameLens = compose(L.user, L.name)
upperCaseUsername = over( usernameLens, name=>name.toUpperCase())
[someBigObjectIncludingAUser].map(upperCaseUsername)[0]//orupperCaseUsername(someBigObjectIncludingAUser)

    Drew Tipson

    Written by

    Primarily Javascript, potentially personal, possibly pointless. I welcome and am fascinated by your many marvelous opinions.

    Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
    Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
    Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade