typed-sf 2.0.0

Typed ready-to-use implementation of SmallF*ck language in Rust.
Documentation

Simple, ready-to-use typed realization of SmallF*ck esoteric language. Highly inspired by this article.

use typed_sf::*;
type SetTrue<Next = EOF> = Cycle<Flip, Flip<Next>>;
// [*<<[*]*>>>] // Move any-sized chunk of True's 2 cells left

#[allow(non_camel_case_types)]
type prog = Cycle<Flip<Left<Left<SetTrue<Right<Right<Right>>>>>>>;

#[allow(non_camel_case_types)]
type result = Run<
    prog,
    State<Nil, True, Cons<True, Nil>>
>;

assert_eq!(
    <result as StateTrait>::val(),
    (vec![true, true, false, false], false, Vec::new())
);

Links:

Github repo: https://github.com/Zote-the-Mighty-4o2/typed-sf.rs
Documentation: https://docs.rs/typed-sf/