Skip to content

joergbrech/xpr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

77 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

xpr

crates.io CI

Disclaimer: This is a toy project that was developed mainly for procrastination purposes.

xpr is a rust library that allows you to use expression templates (expression generics?) with your custom type. It is inspired by boost::yap. Expressions can be lazily evaluated and manipulated using a Fold trait.

Example usage

use xpr::Xpr; 

// An expression representing an operation
let y = -Xpr::new(2)*Xpr::new(-21);

// lazy evaluation
assert_eq!(y.eval(), 42);

Check out the documentation or the examples for more useful examples.

License

Dual-licensed to be compatible with the Rust project.

Licensed under the Apache License, Version 2.0 or the MIT license, at your option. This file may not be copied, modified, or distributed except according to those terms.

About

A rust crate for expression templates

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Packages

No packages published

Languages