Skip to content

Instantly share code, notes, and snippets.

@gfldex
Created March 27, 2024 11:24
Show Gist options
  • Save gfldex/9874a7deddfd5fa2ceae1212664650fb to your computer and use it in GitHub Desktop.
Save gfldex/9874a7deddfd5fa2ceae1212664650fb to your computer and use it in GitHub Desktop.
role LoL {
method AT-POS() {...}
method head() {...}
method tail() {...}
}
role HoH {
method AT-KEY() {...}
}
class CSV does Table {
method header { self[0,*] }
method row-names { self.header } # Not sure if `--> List` or `--> Array`
method body { self[1..*,*] }
method AT-KEY(Str:D() $key) { selt[1..*, self.row-names.first($key, :k)] }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment