(Lisp ‘Project-Euler)

1 minute read

[2021-12-23 Thu 21:52] - 7906

Project Euler via Racket: featuring my first chronologically ascending stream.

  • features commentary on insights required and intellectual increments
  • code posted at : Project Euler

P1 - 7906

- recently finished chapter 3 of SICP
	- still under the influence of streams
- (accumulate (filter (generate .. )))

P2 - 7906

- shifting back to some basic tail-recursion ideas
- memoized streams would do too

P3 - 7906

- streams and tail-recursion

P4 - 7909

- using these simple problems to get familiar with streams
- stateless approach again

P5 - 7909

- just warming up..

P6 - 7910

- approached programmatically even though closed-from expressions exist

P7 - 7924

- streams too slow
- density of primes is asymptotically 1/log(n)
- feasible to overshoot: sieve till 1e6

P8 - 7924

- basic list manipulations
- analogous to signal processing (aids with functional approach)
- duplication, truncation, application specific merge/collation
  does it

P9 - 7924

- procedural approach would be 3 for loops
- did it with 2-tier heirarchical tail recursion
	- recursion and iteration are computationally equipotent

P10 - 7924

- accumulate post the sieve from p7

Detour

- venturing into typed racket before proceeding with the
  consequent problems

Leave a comment