Elixir Todo List Exercise: Revision history

Jump to: navigation, search

Diff selection: Mark the radio buttons of the revisions to compare and hit enter or the button at the bottom.
Legend: (cur) = difference with latest revision, (prev) = difference with preceding revision, m = minor edit.

13 July 2024

12 July 2024

  • curprev 02:3802:38, 12 July 2024Admin talk contribs 1,460 bytes +417 No edit summary
  • curprev 01:4601:46, 12 July 2024Admin talk contribs 1,043 bytes +1,043 Created page with "<source> defmodule TodoList do defstruct todos: [] def start do loop(%TodoList{}) end def loop(state) do IO.puts("Todo List:") IO.inspect state.todos IO.puts("\nOptions:") IO.puts("1. Add Todo") IO.puts("2. Mark Todo as Done") IO.puts("3. Exit") case IO.gets("Select an option: ") |> String.trim() |> String.to_integer() do 1 -> todo = IO.gets("Enter Todo: ") |> String.trim() new_state = add_todo(state, to..."