Pudu programming language
Menu
API reference

Std.Io.readLineOrEnd

1 declaration

fn

readLineOrEnd: Result[Option[Str], Str]

This is a callable function.

What it does

One line of input, or None at the end of it.

The end of input is not a failure: a program reading until there is no more

is doing the ordinary thing.

Read the signature

  • The text after the name is the type checked by Pudu.
  • Names inside [ ] are type arguments, such as the item type held by a collection.
  • Option holds Some(value) or None when no value is available.
  • Result makes success and recoverable failure part of the function's type.

Back to Std.IoSearch related declarations