Skip to content

exfenestram/adamantine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

adamantine

Tools for Immutable/Functional programming in Idiomatic Python

Adamantine contains some useful functional programming modules

tail_recursion implements a somewhat efficient tail recursion optimization To Use it, import the tail_recursion module and use the @tail_recursion annotation on the function to be optimized. When making the recursive call, instead of calling the function call recurse(*args, **kwargs).

This optimization uses a continuation based methodology rather than using exception handling and is about 4-5 x slower than a simple for loop which calls a function.

Tail Calls do not necessarily have to be recursive, they can be mutually recursive by calling mutual(function, *args, **kwargs)

exec_models implements foldl with multiple input lists, as well as several variations of groupby which generate immutable data structures.

About

Tools for Immutable programming in Idiomatic Python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages