Add minimal support for lazy evaluation to chaining syntax #274

Closed
jdalton opened this Issue May 18, 2013 · 8 comments

Comments

6 participants
@jdalton
Member

jdalton commented May 18, 2013

Project's like Lazy.js prove that lazy evaluation can be implemented in a way that generally performs well. For a future release I'd like to bake-in limited support for this in some of our chained methods.

@jdalton jdalton referenced this issue in jashkenas/underscore Jul 4, 2013

Closed

add pipe as alternative to chain #1183

@jdalton jdalton added the stretch goal label May 7, 2014

@jdalton jdalton changed the title from v3.0: Add lazy evaluation to chaining syntax to Add lazy evaluation to chaining syntax May 7, 2014

@jdalton jdalton changed the title from Add lazy evaluation to chaining syntax to Add minimal support for lazy evaluation to chaining syntax May 7, 2014

@jdalton jdalton added the low priority label May 7, 2014

@jdalton jdalton added the help wanted label Jun 1, 2014

FilipZawada added a commit to FilipZawada/lodash that referenced this issue Aug 6, 2014

FilipZawada added a commit to FilipZawada/lodash that referenced this issue Aug 6, 2014

FilipZawada added a commit to FilipZawada/lodash that referenced this issue Aug 6, 2014

FilipZawada added a commit to FilipZawada/lodash that referenced this issue Aug 6, 2014

FilipZawada added a commit to FilipZawada/lodash that referenced this issue Aug 6, 2014

FilipZawada added a commit to FilipZawada/lodash that referenced this issue Aug 6, 2014

FilipZawada added a commit to FilipZawada/lodash that referenced this issue Aug 6, 2014

FilipZawada added a commit to FilipZawada/lodash that referenced this issue Aug 6, 2014

FilipZawada added a commit to FilipZawada/lodash that referenced this issue Aug 6, 2014

FilipZawada added a commit to FilipZawada/lodash that referenced this issue Aug 6, 2014

FilipZawada added a commit to FilipZawada/lodash that referenced this issue Aug 6, 2014

FilipZawada added a commit to FilipZawada/lodash that referenced this issue Aug 6, 2014

FilipZawada added a commit to FilipZawada/lodash that referenced this issue Aug 6, 2014

FilipZawada added a commit to FilipZawada/lodash that referenced this issue Aug 6, 2014

FilipZawada added a commit to FilipZawada/lodash that referenced this issue Aug 6, 2014

@FilipZawada

This comment has been minimized.

Show comment
Hide comment
@FilipZawada

FilipZawada Aug 21, 2014

Contributor

PR: #678

As requested, I've implemented: map, filter, reverse, drop, dropWhile, dropRight, dropRightWhile, take, takeWhile, takeRight, takeRightWhile, first, last, initial, rest, value.

All seems to work quite fast, results vary between 50% - 10% faster than Lazy.js - depends on use case and on Chrome mood (I suspect "optimized too many times").

Contributor

FilipZawada commented Aug 21, 2014

PR: #678

As requested, I've implemented: map, filter, reverse, drop, dropWhile, dropRight, dropRightWhile, take, takeWhile, takeRight, takeRightWhile, first, last, initial, rest, value.

All seems to work quite fast, results vary between 50% - 10% faster than Lazy.js - depends on use case and on Chrome mood (I suspect "optimized too many times").

@jdalton

This comment has been minimized.

Show comment
Hide comment
Member

jdalton commented Aug 22, 2014

Wahoo!

@ali-bugdayci

This comment has been minimized.

Show comment
Hide comment
@ali-bugdayci

ali-bugdayci Aug 22, 2014

great job 👍

great job 👍

FilipZawada added a commit to FilipZawada/lodash that referenced this issue Aug 26, 2014

@jdalton

This comment has been minimized.

Show comment
Hide comment
@jdalton

jdalton Oct 2, 2014

Member

Closed by 461b294.

Member

jdalton commented Oct 2, 2014

Closed by 461b294.

@jdalton jdalton closed this Oct 2, 2014

@arestov arestov referenced this issue Oct 3, 2014

Closed

Reusable chains #730

@jdalton jdalton referenced this issue in jashkenas/underscore Oct 21, 2014

Closed

2.0 chaining behavior #1896

@kenokabe

This comment has been minimized.

Show comment
Hide comment
@kenokabe

kenokabe Nov 19, 2014

Great. Just from curiosity, is there any way to have an infinite sequence like lazy.js?
Such as Natural numbers, Fibonacci numbers, from such as iterate or generatethen lazy take?

Great. Just from curiosity, is there any way to have an infinite sequence like lazy.js?
Such as Natural numbers, Fibonacci numbers, from such as iterate or generatethen lazy take?

@bnjmnt4n

This comment has been minimized.

Show comment
Hide comment
@bnjmnt4n

bnjmnt4n Nov 19, 2014

Member

@kenokabe

is there any way to have an infinite sequence like lazy.js?

Not as of yet.

Member

bnjmnt4n commented Nov 19, 2014

@kenokabe

is there any way to have an infinite sequence like lazy.js?

Not as of yet.

@banderson banderson referenced this issue in banderson/functional-js-reverse-engineering-the-hype Aug 12, 2015

Closed

What is the state of lazy evaluation in Lodash? #4

0 of 2 tasks complete
@cyrilchapon

This comment has been minimized.

Show comment
Hide comment
@cyrilchapon

cyrilchapon Oct 18, 2016

Where can we find a list of which methods are supported ?

Where can we find a list of which methods are supported ?

@jdalton

This comment has been minimized.

Show comment
Hide comment
Member

jdalton commented Oct 18, 2016

@cyrilchapon See the _ docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment