Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
example
LICENSE
index.js
index.mjs
package.json
readme.md
test.js

readme.md

No frills L-system calculator

Setup

# Fetch latest from github
npm i thewhodidthis/lsys

Usage

import lsys from '@thewhodidthis/lsys'

// Algae
const data = new Map([
    ['A', 'AB'],
    ['B', 'A']
])

const seed = ((rules, axiom) => {
    const step = lsys(rules, axiom)

    const tick = function * () {
        while (1) {
            yield step()
        }
    }

    return tick()
})(data, 'A')

seed.next()