Skip to content
This repository has been archived by the owner on Dec 29, 2019. It is now read-only.

clio-lang/clio-lazy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lazy Clio provides lazy evaluation for both Clio and JavaScript languages.

Usage in Clio

In Clio all functions are lazy by default.

Usage in JavaScript

You need to use lazy to wrap your functions:

const lazy = require("clio-lazy");

const lazyAdd      = lazy((a, b) => a + b);
const myLazyNumber = lazyAdd(2, 3);
//    ^ this will be evaluated only when the value is needed!

// for example if we do:
console.log(myLazyNumber);

// or if we do:
const notLazy = myLazyNumber + 2;

License

Apache 2.0

About

Lazy evaluation for Clio and JS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published