Pudu programming language
Menu
API reference

Std.Io.readAllLinesOf

1 declaration

fn

readAllLinesOf: Str -> Result[Array[Str], Std.Io.IoError]

This is a callable function.

What it does

Every line of a file, in order.

Named so its cost is visible: this holds every line at once, and

foldLines is the one that does not.

Read the signature

  • The text after the name is the type checked by Pudu.
  • Read arrows from left to right: inputs come first, and the final type is returned.
  • Names inside [ ] are type arguments, such as the item type held by a collection.
  • Result makes success and recoverable failure part of the function's type.

Back to Std.IoSearch related declarations