Comments (2)
Implicit partials are intended to be for simple, straightforward operations that can't easily be built out of other operations, not to replace lambdas completely. That being said, Coconut does actually have an easy way to write this without using a lambda (this style is known as point-free programming) using the lift
built-in:
>>> [0, 1] |> lift(+)(.[1], .[0])
1
or:
>>> [0, 1] |> .[1] `lift(+)` .[0]
1
from coconut.
Oh, it does implement the feature but using 'lift' under such circumstances is weirder and more cumbersome than implicit lambda.
Anyway, thanks for your good advice and I really love coconut.
from coconut.
Related Issues (20)
- Implicit application doesn't work if the function's first token is a string literal HOT 2
- unicode alternative of multiple-argument pipe backward `↤*` does not work HOT 1
- Add walrus operator function implicit partial
- Some Unicode characters are replaced with a newline HOT 1
- fmap support for bytes HOT 1
- Coefficient syntax error message is too specific HOT 3
- type-checking and operator partials do not play nice with each other HOT 7
- When to output colors handled incorrectly HOT 1
- Conda-Forge package is marked x86 only HOT 1
- Assignment functions with compound statement HOT 1
- Shorthand for match assignment functions HOT 14
- Empty `zip` objects error on `__len__` HOT 2
- Destructuring first and last item HOT 1
- Add `CoconutWarning` for all Coconut runtime warnings
- `--strict` should disallow implicit string concatenation
- Allow custom numpy integration
- Some f-strings don't parse correctly HOT 1
- Wrong f-string parsing and compile warning HOT 1
- Warn on variables that are only ever referenced
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from coconut.