Skip to main content

Build Status PyPI

Enables Python to be functionally chain-styled.

Document

  • Simplified Chinese documents here.

If you are interested in me,you can follow my Blog([STRIKEOUT:一波软广2333])。

How to use?

install form pypi:

$ pip install fc

and you just import Fc,like this: from fc import Fc

then you can enjoy lambda like Kotlin/JS:

from fc import Fc

l = (
  Fc([1, 2, 3, 4, 5])
    .map(lambda x: x + 1)
    .filter(lambda x: x > 4).print()    # [5, 6]
    .map(lambda x: x + 1).print()       # [6, 7]
    .cat([8, 9]).print()                # [6, 7, 8, 9]
    .add(10).print()                    # [6, 7, 8, 9, 10]
    .catHead([1, 2, 3, 4, 5]).print()   # [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
    .limit(3)
    .done()
)
assert l == [1, 2, 3]

You can check this this test file and understand more.

Have Fun ;)

Release files for fc 0.1.12

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fc 0.1.12
File Size Uploaded
fc-0.1.12.tar.gz 6.9 kB Details

Release files / fc-0.1.12.tar.gz

Download URL fc-0.1.12.tar.gz
Size 6.9 kB
Tags Source
SHA-256 checksum
How to use checksums
d600527f584752e0a82c947171fbe36782f49625566af19e6f37ccf1961f8498
BLAKE2b-256 checksum
How to use checksums
20b2a8fcfd4f843af6ee8c5837611764ba04b9ac1d0bc3b837b71db2b2648b3d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1.12 This release

1 release file

0.1.11

1 release file

0.1.10

1 release file

0.1.9

1 release file

0.1.8

1 release file

0.1.7

1 release file

0.1.6

1 release file

0.1.5

1 release file

0.1.3

1 release file

0.1.2

1 release file

0.1.1

1 release file

0.1.0

1 release file

0.0.12

1 release file

0.0.11

1 release file

0.0.10

1 release file

0.0.9

1 release file

0.0.8

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page