A list of Exemplary Rails Applications for critical study.
This is a recreation of another list of applications I was studying
;; Inspired by https://aphyr.com/posts/340-acing-the-technical-interview | |
(defun conz (head tail) | |
(lambda (_) (if _ head tail))) | |
(let ((subject (conz 1 (conz 2 nil)))) | |
(assert (= 1 (funcall subject t))) | |
(assert (= 2 (funcall (funcall subject nil) t)))) | |
(defun mth (lizt mth) |
(defpackage #:cl-game-random | |
(:use #:cl) | |
(:export #:random-whole #:random-range | |
#:random-digit #:random-alpha | |
#:random-array-subscripts | |
#:random-char #:random-svref | |
#:random-nth #:random-elt | |
#:random-aref | |
#:sample | |
#:bias |
<fieldset> | |
<legend>What gender of address would you prefer we use in communications?</legend> | |
<ul> | |
<li> | |
<input type="radio" | |
name="preferred-gender-personal-address" | |
value="none" | |
checked/> | |
<label for="none">None</label> | |
</li> |
(defun pr (obj &optional (str *standard-output*)) | |
(princ o str) | |
str) | |
;;; ... it becomes possible to chain `pr' expressions together: | |
;; (pr "!" (pr "world" (pr " " (pr "hello")))) | |
;;; This means, with a little convenience function (like `format'): |
;;; History | |
(defun make-history () | |
(let (history) | |
(lambda (&optional event) | |
(when (and event | |
(not (equalp event (first history)))) | |
(push event history)) | |
(first history)))) |
╷╷ | |
└┘ | |
╶┐┌╴ | |
┌┘└┐ | |
│┌┐│ | |
└┘└┘ | |
╷┌─┐┌─┐╷ | |
└┘┌┘└┐└┘ | |
┌┐└┐┌┘┌┐ | |
│└─┘└─┘│ |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
class WordB20 | |
Base20 = %w( B C D F G H J K L M N P Q R S T V W X Z ) | |
def self.random_b20(word_size) | |
word_chars = [] | |
word_size.times do | |
word_chars << Base20.sample | |
end | |
word_chars.join("") | |
end |
(defpackage #:bijective-numeration | |
(:nicknames :bij) | |
(:use #:common-lisp) | |
(:export #:*base20-en* | |
#:*base26-en* | |
#:*base30-en* | |
#:*base36-en* | |
#:*digits*) | |
(:export #:weight | |
#:digit |