Today I Learned

Some of the things I've learned every day since Oct 10, 2016

70: Corecursion

Corecursion, a sort of dual procedure to recursion, starts with a base case and builds upon it iteratively, as opposed to recursion which breaks down towards a base case.

A good example of corecursion is the evaluation of a stream, which starts from a base case (the first item in the stream as well as a method for computing the rest of the stream), and uses it to iteratively produce the rest of the infinite data structure.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: