Awesome
snippets
A curated list of interesting Carp code snippets. They’re meant to be instructional, and are thus heavily commented—some might even argue they’re overcommented.
Want to add a snippet? Open a Pull Request!
Table of Contents
- builder.carp: A macro that helps implementing the builder pattern in Carp.
- build_system.carp: Showcase for using Carp code as a build system.
- cffi.carp: A simple example of how to work with the C interface.
- hex.carp: A parser for hexadecimal numbers that shows how to work with modules.
- ski.carp: A module implementing the SKI combinator calculus.
- type_aliases.carp: A macro-writing macro for type aliasing.
- when_chain.carp: A macro to transform nested
when
forms. - word_count.carp: A simple word counting program.
Have fun!