Skip to content

orion0616/exlist

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ExList

CircleCI

This is a wrapper of Python's List. You can use map, filter and fold succesively by method chain.

Install

pip install exlist

Usage

>>> from exlist import ExList
>>> l = ExList([1,2,3,4])
>>> l.map(lambda x: x*3)
[3, 6, 9, 12]
>>> l.map(lambda x: x*3).filter(lambda x: x%2 == 0)
[6, 12]
>>> l.map(lambda x: x*3).filter(lambda x: x%2 == 0).fold(0, lambda x,y: x+y)
18

About

Enable to chain methods on Python List

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages