Files
hak/src/kernel.hcl

31 lines
375 B
HCL
Raw Normal View History

2024-07-05 00:53:37 +09:00
class Object {
}
class Collection: Object {
}
class IndexedCollection: Collection {
}
class FixedSizedCollection: Collection {
}
class Array: FixedSizedCollection {
}
class String: Array {
}
fun Collection:length() {
return (arr.length self)
}
fun Collection:slice(index count) {
return (arr.slice self index count)
}
printf "string length %d\n" ("aaaa":length)