Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create generator for practice exercises #752

Open
9 of 84 tasks
ErikSchierboom opened this issue Jan 14, 2025 · 2 comments
Open
9 of 84 tasks

Create generator for practice exercises #752

ErikSchierboom opened this issue Jan 14, 2025 · 2 comments

Comments

@ErikSchierboom
Copy link
Member

ErikSchierboom commented Jan 14, 2025

This issue keeps track of which practice exercises have had a generator added to them:

  • accumulate
  • acronym
  • all-your-base
  • allergies
  • anagram
  • armstrong-numbers
  • atbash-cipher
  • bank-account
  • beer-song
  • binary
  • binary-search
  • binary-search-tree
  • bob
  • change
  • clock
  • collatz-conjecture
  • complex-numbers
  • crypto-square
  • diamond
  • difference-of-squares
  • dominoes
  • eliuds-eggs
  • etl
  • flatten-array
  • gigasecond
  • go-counting
  • grade-school
  • grains
  • hamming
  • hello-world
  • hexadecimal
  • isbn-verifier
  • isogram
  • kindergarten-garden
  • largest-series-product
  • leap
  • leap
  • list-ops
  • luhn
  • matching-brackets
  • meetup
  • minesweeper
  • nth-prime
  • nucleotide-count
  • octal
  • pangram
  • pascals-triangle
  • perfect-numbers
  • phone-number
  • pig-latin
  • poker
  • pov
  • prime-factors
  • protein-translation
  • proverb
  • pythagorean-triplet
  • queen-attack
  • raindrops
  • reverse-string
  • reverse-string
  • rna-transcription
  • robot-name
  • robot-simulator
  • roman-numerals
  • rotational-cipher
  • run-length-encoding
  • say
  • scrabble-score
  • secret-handshake
  • series
  • sieve
  • space-age
  • spiral-matrix
  • strain
  • sublist
  • sum-of-multiples
  • transpose
  • triangle
  • trinary
  • two-fer
  • word-count
  • wordy
  • yacht
  • zipper
@ErikSchierboom
Copy link
Member Author

I tried to more elegantly handle keywords and maps, but finally found out why it didn't work:

(defn- wrap-context [model]
  (clojure.walk/postwalk
   #(cond
     (map? %) (java.util.HashMap. ^java.util.Map %)
     (keyword? %) (name %)
     :else %) model))

We're basically always losing information before rendering.

source

@ErikSchierboom
Copy link
Member Author

I've tried monkey patching that function but then hbs just crashes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant