|
|
|
|
@ -1,4 +1,4 @@
|
|
|
|
|
#Guile Schemeing
|
|
|
|
|
# Guile Schemeing
|
|
|
|
|
The purpose of this repository is to hold various small utilities I commonly
|
|
|
|
|
use in Scheme. Running `make; make install` in the tk direcory will install
|
|
|
|
|
sources to the Guile `(%site-dir)` and compiled .go files to the Guile
|
|
|
|
|
@ -12,24 +12,36 @@ Aliases to shorten common names.
|
|
|
|
|
|
|
|
|
|
## listlogic.scm
|
|
|
|
|
Various logical tools.
|
|
|
|
|
`(display-if-not)` Displays a given string if the first argument is `#f`
|
|
|
|
|
`(flatten)` De-nests lists into a form where no `(car)` contains a list
|
|
|
|
|
`(lp&)` Tests some predicate pairwise over two lists
|
|
|
|
|
`(l&)` Tests the equality according to `eq?` over two lists, returns as a list
|
|
|
|
|
|
|
|
|
|
`(display-if-not)`
|
|
|
|
|
Displays a given string if the first argument is `#f`
|
|
|
|
|
`(flatten)`
|
|
|
|
|
De-nests lists into a form where no `(car)` contains a list
|
|
|
|
|
`(lp&)`
|
|
|
|
|
Tests some predicate pairwise over two lists
|
|
|
|
|
`(l&)`
|
|
|
|
|
Tests the equality according to `eq?` over two lists, returns as a list
|
|
|
|
|
all passing elements
|
|
|
|
|
`(if-some)` The common `(if var var)` pattern
|
|
|
|
|
`(if-some-else)` The common `(if var var default)` pattern
|
|
|
|
|
`(if-some)`
|
|
|
|
|
The common `(if var var)` pattern
|
|
|
|
|
`(if-some-else)`
|
|
|
|
|
The common `(if var var default)` pattern
|
|
|
|
|
|
|
|
|
|
## mcron.scm
|
|
|
|
|
Constants and functions for working with time, schedules and mcron
|
|
|
|
|
`sec/min` `sec/hour` `sec/day` `sec/week` Useful constants
|
|
|
|
|
`sec/mins` `sec/hours` `sec/days` `sec/weeks` Readable shortcuts, `(sec/mins 4)`
|
|
|
|
|
rather than `(* 4 60)` or worse `240`
|
|
|
|
|
`(step-from)` Normalize a time to be the next step sized increment from a base time
|
|
|
|
|
|
|
|
|
|
`sec/min` `sec/hour` `sec/day` `sec/week`
|
|
|
|
|
Useful constants
|
|
|
|
|
`sec/mins` `sec/hours` `sec/days` `sec/weeks`
|
|
|
|
|
Readable shortcuts, `(sec/mins 4)` rather than `(* 4 60)` or worse `240`
|
|
|
|
|
`(step-from)`
|
|
|
|
|
Normalize a time to be the next step sized increment from a base time
|
|
|
|
|
`(str->secs)`
|
|
|
|
|
`(strf->secs)`
|
|
|
|
|
Converts a date string into seconds
|
|
|
|
|
`(current-date-string)`
|
|
|
|
|
`(yesterday-date-string)`
|
|
|
|
|
Returns the date as a string for logging purposes
|
|
|
|
|
|
|
|
|
|
## ports.scm
|
|
|
|
|
Convenience when working with ports
|
|
|
|
|
|