Skip to content

Instantly share code, notes, and snippets.

@tautologico
Created October 26, 2013 03:22
Show Gist options
  • Save tautologico/7164955 to your computer and use it in GitHub Desktop.
Save tautologico/7164955 to your computer and use it in GitHub Desktop.
A macro for easier building of lists.
macro_rules! list(
( $e:expr, $($rest:expr),+ ) => ( @Cons($e, list!( $( $rest ),+ )) );
( $e:expr ) => ( @Cons($e, @Empty) );
() => ( @Empty )
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment