Skip to content

Releases: 0scarB/tail-recursive

2.1.0

10 Jan 01:46
Compare
Choose a tag to compare

Added

  • FeatureSet.NESTED_CALLS

Changed

  • FeatureSets are now enum flags.

Fixed

  • If func.tail_call(...).__r<operation>__(<other>) does not exist then other.__<operation>__(func.tail_call(...)._resolve()) will be tried. E.g.: [1, 2] + func.tail_call(...) is now supported.

2.0.0

12 Sep 17:36
Compare
Choose a tag to compare

Added

  • Overrides for most dunder methods called on tail_call(...).

Changed

  • nested call mode has now been renamed to feature set.
    There is the base and full feature set.
    The full feature set enables nested tail calls and dunder overrides.
  • tail_call(...).__repr__ no longer pretty prints a string relating to the tail call.
    Use tail_call(...)._to_string() to pretty print tail calls.

1.2.0

09 Sep 15:39
Compare
Choose a tag to compare

Added

  • __repr__for functions decorated with tail_recursive
  • __repr__ for return values of tail_call
  • Resolves nested tail calls (i.e. <function>.tail_call([..., ]<function>.tail_call(...)[, ...]))
  • Mode parameter for turning resolution of tail calls on or off (i.e. @tail_recursive(nested_call_mode="resolve_nested_calls"|"do_not_resolve_nested_calls"|NestedCallMode.RESOLVE_NESTED_CALLS|NestedCallMode.DO_NOT_RESOLVE_NESTED_CALLS))

1.1.0

02 Sep 06:54
Compare
Choose a tag to compare
Merge branch 'master' of github.com:0scarB/tail-recursive