16 lines
452 B
Gleam
16 lines
452 B
Gleam
import gleam/erlang/atom
|
|
|
|
pub fn read_input() -> String {
|
|
io_get_chars("", 1)
|
|
}
|
|
|
|
pub type NotUsed
|
|
|
|
// https://www.erlang.org/doc/apps/stdlib/shell.html#start_interactive/1
|
|
@external(erlang, "shell", "start_interactive")
|
|
pub fn shell_start_interactive(options: #(atom.Atom, atom.Atom)) -> NotUsed
|
|
|
|
// https://www.erlang.org/doc/apps/stdlib/io.html#get_chars/2
|
|
@external(erlang, "io", "get_chars")
|
|
fn io_get_chars(prompt: String, count: Int) -> String
|