8000 GitHub - jrg94/jrg94: Jeremy Grifski's GitHub profile · GitHub
[go: up one dir, main page]

Skip to content
jrg94Public

About

Jeremy Grifski's GitHub profile

Resources

Stars

3 stars

Watchers

0 watching

Forks

Latest commit

 

History

322 Commits

Folders and files

Repository files navigation

Welcome to My Profile!

This week's code snippet, Baklava in Formality, is brought to you by Subete and the Sample Programs repo.

baklavaLine(n: Nat): String
  let numSpaces = if Nat.gte(n, 10) then Nat.sub(n, 10) else Nat.sub(10, n)
  let numStars = Nat.sub(21, Nat.mul(2, numSpaces))
  String.repeat(" ", numSpaces) | String.repeat("*", numStars) | "\n"

baklava(lines: String, n:Nat): String
  case n {
    zero: lines | baklavaLine(0),
    succ: lines | baklavaLine(n) | baklava(lines, n.pred)
  }

Main: IO(Unit)
  do IO {
    IO.put_string(baklava("", 20))
  }

Below you'll find an up-to-date list of articles by me on The Renegade Coder. For ease of browsing, emojis let you know the article category (i.e., blog: ✒️, code: 💻, meta: 💭, teach: 🍎)

Also, here are some fun links you can use to support my work.

An image of @jrg94's Holopin badges, which is a link to view their full Holopin profile


This document was automatically rendered on 2026-11-20 using SnakeMD.

About

Jeremy Grifski's GitHub profile

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

0