Generators

functions

generator-next

@function generator-next($name) { ... }
View source

Description

Return next value for generator

Parameters

parameter Name parameter Description parameter Type parameter Default value
$name none String none

Throws

  • Unknown $generator #{$generator}.

Requires

generator-valid

@function generator-valid($name) { ... }
View source

Description

Check whether an generator is still valid

Parameters

parameter Name parameter Description parameter Type parameter Default value
$name none String none

Throws

  • Unknown $generator #{$generator}.

Requires

mixins

generator

@mixin generator($name) { ... }
View source

Description

Initialize a new generator

Parameters

parameter Name parameter Description parameter Type parameter Default value
$name

generator's name

String none

Requires

yield

@mixin yield($value) { ... }
View source

Description

Yield a new value for the generator

Parameters

parameter Name parameter Description parameter Type parameter Default value
$value none Any none

Throws

  • You cannot yield outside of a generator.

Requires

generator-rewind

@mixin generator-rewind($name) { ... }
View source

Description

Reset an generator

Parameters

parameter Name parameter Description parameter Type parameter Default value
$name none String none

Throws

  • Unknown $generator #{$generator}.

Requires

variables

[private] __generators__

$__generators__: () !global;
View source

Description

Map of existing generators

Used by

[private] __current__

$__current__: null !global;
View source

Description

Current generator stored in generator

Used by

Iterators

functions

iterator

@function iterator($collection, $mapping, $mapping-args...) { ... }
View source

Description

Iterator initialization

Parameters

parameter Name parameter Description parameter Type parameter Default value
$collection none List, Map, String none
$mapping none String, Null none
$mapping-args

Extra arguments for $mapping

Arglist none

Returns

Iterator

Used by

iterator-rewind

@function iterator-rewind($iterator) { ... }
View source

Description

Iterator reset

Parameters

parameter Name parameter Description parameter Type parameter Default value
$iterator none Iterator none

Returns

Iterator

Requires

iterator-valid

@function iterator-valid($iterator) { ... }
View source

Description

Iterator validity checker

Parameters

parameter Name parameter Description parameter Type parameter Default value
$iterator none Iterator none

Returns

Boolean

iterator-next

@function iterator-next($iterator) { ... }
View source

Description

Iterator next

Parameters

parameter Name parameter Description parameter Type parameter Default value
$iterator none Iterator none

Returns

Iterator

iterator-api

@function iterator-api($iterator) { ... }
View source

Description

Iterator API cleaner

Parameters

parameter Name parameter Description parameter Type parameter Default value
$iterator none Iterator none

Returns

Simple iterator