Open josh-degraw opened 5 days ago
I don't believe in "safe" dotnet you can access things on a bit by bit basis, the smallest unit is the byte.
Sample Gleam
pub fn main() { io.println("Hello from hello_world!") let bits = <<3:size(8)>> case bits { <<head, tail>> -> { io.println("have some bits") io.debug(head) io.debug(tail) } _ -> { io.println("everything else") 0 } } }
Output Javascript
export function main() { $io.println("Hello from hello_world!"); let bits = toBitArray([sizedInt(3, 8, true)]); if (bits.length == 2) { let head = bits.byteAt(0); let tail = bits.byteAt(1); $io.println("have some bits"); $io.debug(head); return $io.debug(tail); } else { $io.println("everything else"); return 0; } }
So the equivalent F# should look something like the JS imo.
I don't believe in "safe" dotnet you can access things on a bit by bit basis, the smallest unit is the byte.
Sample Gleam
Output Javascript
So the equivalent F# should look something like the JS imo.