Skip to content

Instantly share code, notes, and snippets.

View TokenChingy's full-sized avatar

Jason Lei TokenChingy

  • HBF
  • Perth, Western Australia
  • 22:22 (UTC +08:00)
View GitHub Profile
@PhilipWitte
PhilipWitte / concepts.nim
Last active March 8, 2023 00:46
How to use concept in Nim
type
CanDance = concept x
dance(x) # `x` is anything that has a `dance` procedure
proc doBallet(dancer: CanDance) =
# `dancer` can be anything that `CanDance`
dance(dancer)
# ---