Age | Commit message (Collapse) | Author |
|
Time to do the fun non-yakshaving part. I'll start out by writing
some custom types for the objects of concern: ranks, suits, cards and
sets of cards.
|
|
Instead of exporting cantedraw.lib.macro._ and making anyone who wants
to use the --> macro _require_ importing that specific symbol, let's
just make it so the user has to supply a placeholder name before they
do anything. This means each package provides its own placeholder
symbol which lowers coupling.
|
|
This is mostly a sanity check in-case anyone else decides to load this
system for use in their own package - don't want to conflict with
their names.
|
|
|
|
|
|
|
|
|
|
Why name it something unique when this is what I'm going to be making
at the end of it all? Just makes it more confusing for the end user.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
f $ g $ h -> f(g(h)) whereas previous implementation ($ f g h) was
h(g(f)).
|
|
Given an indicator function (A->B) and a list of items of A, return
an association list associating B to the elements that map to it;
essentially the inverse map of the indicator.
|
|
|
|
bob.lisp quickloads the dependencies necessary and defines functions
which I can just call from my REPL to load or build the project.
Better than loading the file over and over again. Affectionately
named after "Bob The Builder".
|
|
Given a list and index into that list, return a cons where the car is
all elements up to that index (exclusive) and the cdr is the rest of
the list.
|
|
Basically a wrapper over subseq but for when using `->>` as the list
is the last parameter.
|
|
The `$` operator takes a sequence of FORMS and returns a unary
function which applies the input through that sequence via the `->>`
operator.
For example, consider the predicate "not null". `null` is built into
Common Lisp but "not null" requires writing a
function (lambda (x) (not (null x))). Now, using this operator, you
can write ($ not null) which returns the same lambda as above while
being more concise.
|
|
|
|
Splitting macros and functions into different packages and source code
makes it easier to look at. Functions currently implemented:
- range: like Python's range
- parse-integer*: parse-integer but junk-allowed is set to t.
|
|
|
|
|
|
`fn' is a convenience macro for defining functions with a type
specifier. Only really matters for `sbcl` and other hard-optimising
Lisp interpreters which actually take these seriously.
|
|
Allows junk, and doesn't crash horribly.
|
|
|
|
|
|
|
|
Setup boilerplate for system/package management. In particular, setup
an entry-point and Shinmera's "deploy" to build executables.
Also write some scripts to easily load or build the project without
Emacs - just `sbcl --load <x>.lisp`.
|