Prelude> (+) 3 4 == (+ 3) 4
True
So you could have an `add3` just by applying 3 as the first argument. Prelude> let add3 = (+ 3)
Prelude> add3 5
8
hoogle describes uncurry as a function on pairs. https://www.haskell.org/hoogle/?hoogle=uncurry <ConditionalSpinner renderIf={data}><PersonRenderer person={data.person} /></ConditionalSpinner>
Could be written better as: <PersonRenderer person={data.person} />
Where PersonRenderer would be defined as such: class PersonRenderer extends Component {
render() {
if(this.props.person) {
return <div>personcontent</div>
}
return <LoadingIndicator/>
}
}
Given this, I'm still not sure how an If "component" would be achieved (and further, you'd need an Else or a Switch component anyway if going down this route). Maybe you could explain the benefits of such a path? brew install docker-machine
docker-machine create --name myserver ...digital-ocean-options
eval $(docker-machine env myserver)
docker ps
that is: Location: SF
Remote: Yes/Preferably (6+ years of remote experience)
Willing to relocate: No
Technologies: JS(Babel), React, Haskell, Docker
Résumé/CV: christopherbiscardi.com/resume.pdf
Email: [email protected]
Current Interesting projects: * https://github.com/superawesomelabs/leo
- A Modern Component library system built on PostCSS and Babel (Not OSS yet)
it's sugar for multiple single-argument functions.
When examining it this way, the `g` function above would translate to
Which is a function taking a single tuple argument. It is still "default curried" but the argument being passed in is a single argument rather than multiple so we don't expand it to multiple single-arg functions. Perhaps it is more illustrative to show the definition as the single argument it is rather than using haskell's destructuring to pull x and y out of the tuple.
and a ghci session for completeness:
So when we say that Haskell functions are "curried by default", what we're referring to is roughly the underlying single-argument nature of haskell functions.