Skip to content

Instantly share code, notes, and snippets.

View Cortado-J's full-sized avatar

Cortado-J Cortado-J

View GitHub Profile
@Cortado-J
Cortado-J / LazyStream.swift
Last active August 10, 2020 04:49
Enables simple refactoring of lazy processing of 'streams' of values.
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
///<<< Support Code for Lazy Streams
///<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
///
/// Enables simple refactoring of lazy processing of 'streams' of values.
/// A stream is taken here ot mean a lazy sequence.
///
/// The code is not generic so if streams of different types are required
/// then extra sctions will be needed.
/// Simple to construct for a new type T though: