unbound 0.1.2

Locally nameless representation with automatic capture-avoiding substitution and alpha equivalence
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
//! Helper functions for working with names and bindings

use crate::{Bind, Name};

/// Helper function to create a name from a string
pub fn s2n<T>(s: impl Into<String>) -> Name<T> {
    Name::new(s)
}

/// Helper function to bind a pattern in a body
pub fn bind<P, T>(pattern: P, body: T) -> Bind<P, T> {
    Bind::new(pattern, body)
}