slavaGanzin/ramda.py

`apply_spec` only works once

Closed this issue · 0 comments

For example:

assert (
    R.map(
        R.apply_spec(
            {
                "foo": R.prop("bar"),
            }
        ),
        [{"bar": 1}, {"bar": 2}],
    )
    == [{"foo": 1}, {"foo": 2}]
)

fails because it returns [{"foo": 1}, {"foo": 1}]