Commit Graph

12 Commits

Author SHA1 Message Date
efim 9c64cf128f buch of things to remind myself
- characters are # and non-excape, #\a
- i am way to quick to judge pairwise operations from left with #'reduce
- iteration can be actually simple with dotimes, dolist.
  i'm quite afraid of #'loop but #'do seems cool and inviting
2022-07-30 18:33:04 +00:00
efim e076e76575 new things about function parameters
- key params are after &rest, and get put into &rest in order of call
appearance
- can have closure around same place / generalized varialbe, holy cow
- apply takes list, but can also take several arguments with last one
being a list
2022-07-29 07:42:25 +00:00
efim 8865b0df6a function parameters
both optional and keyword parameters can include both default value AND
'providedp' predicate of whether they were provided
2022-07-28 19:10:31 +00:00
efim e5306c46e3 clog reading tutorials 2022-07-28 18:02:38 +00:00
efim 0b3a788a13 learning to add quicklisp to flake
and non CL dependencies without which nix-store SBCL isn't able to
install pakcages
2022-07-28 15:38:16 +00:00
efim 89673df888 new thing - functions returning multiple values
(values 1 2 3) at the tnd of funtion fill make funciton return 1, 2, 3
and I can either treat function as returning single value,
or use functions like multiple-value-list or multiple-value-[bind|setq]
to get secodary return values

so not quite like a tuple
2022-07-28 15:35:14 +00:00
efim 6dcca61283 cool about arrays and vectors
arrays have #'array-dimentions and #'array-rank (as a matrix)
and there's cool (row-major-aref my-arr index) for indexing array with
single index, going throug all elements

vectors have literal notation #(1 2 4 1),
they are one dimentional
have :element-type key in constructor, not quite sure how to use that

and we can try to #'coerce list to something else by providing symbol
for type, which we could get from (type-of my-vector)

also literal notation for byte vectors, cool #*110011001
2022-07-26 12:18:42 +00:00
efim ce9c7ac999 koans, lists
subsist not including right part
2022-07-25 07:45:38 +00:00
efim fd03924c10 learning koans
- refreshed understanding of lexical vs. dynamic binding
  https://gigamonkeys.com/book/variables.html
- was taught CASE as simpler variant of COND
2022-07-24 13:18:22 +00:00
efim 49c00c24ee pulled in lisp koans for solving
https://github.com/google/lisp-koans
2022-07-24 12:18:03 +00:00
efim fe0950582d adding flake with sbcl and direnv 2022-07-24 12:13:38 +00:00
efim 067aebaf81 exercises and notes from "Gentle introduction" 2022-07-24 11:52:07 +00:00