Skip to main content

python functional utilities

Project description

import xython as xy
_ = xy._

xy.and_then(
        sum | xy.partial([]),
        sum,
        print
        )([[1, 2, 3], [2, 3, 4]])
# => print(sum(sum([[1, 2, 3], [2, 3, 4]], [])))

_*2    | xy.before_with(_ + 10) | xy.call(2)  # => (2 + 10) * 2

_ + 10 | xy.next_by(_ * 5)     | xy.call(2)   # => (2 + 10) * 5

(lambda x, y: x+y) | xy.to_curry | xy.call(1, 2)  # => 1 + 2

(lambda x, y: x+y) | xy.to_curry | xy.call(1) | xy.call(2)  # => 1 + 2

Not only the syntax sugar, JIT and AOT could be expected.

Project details


Release history Release notifications

This version
History Node

0.0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
xython_for_python-0.0.1-py3-none-any.whl (7.1 kB) Copy SHA256 hash SHA256 Wheel 3.6 Feb 8, 2018

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page