$

Indicates the authoritative variable type parameter for a polymorphic procedure. 1 2

toggle example
swap.jai
toggle example
find.jai
toggle example
do_three_times.jai

  1. what the dollar sign indicates is that this is a type variable which means we don’t know what type it is at declaration time. the type of this variable will be determined when the function is called.
    “Polymorphic Procedures, part 1” YouTube, uploaded by Jonathan Blow, Apr 1, 2015, https://youtu.be/BwqeFrlSpuI?t=228 

  2. the reason that we only use the dollar sign once is that the dollar sign tells us which argument is authoritative over what the type should be..
    “Polymorphic Procedures, part 1” YouTube, uploaded by Jonathan Blow, Apr 1, 2015, https://youtu.be/BwqeFrlSpuI?t=360 

jailang 2019 pixeldroid
https://github.com/pixeldroid/jailang
programming pages theme v0.5.21 (https://github.com/pixeldroid/programming-pages)