ref: 3af73a7086c91dd6b94b5407081e4a9c80014a5b
dir: /lib/std/writeall.myr/
use "errno" use "result" use "option" use "syswrap" use "types" pkg std = const writeall : (fd : fd, src : byte[:] -> (size, option(errno))) ;; const writeall = {fd, src var sz sz = src.len while src.len != 0 match std.write(fd, src) | `Ok n: src = src[n:] | `Fail e: -> (sz - src.len, `Some e) ;; ;; -> (sz, `None) }