Skip to content

Code clarity #9

@ToddG

Description

@ToddG

WHAT
I'm not yet a gleam expert. But even with decades of software experience, I'm having trouble following the code in internal.gleam... here are some functions in particular:

QUESTIONS

  1. How does this work? Why do you pass in a pos?

fn do_list_focusable(

fn do_list_focusable(
  pos: Pos,
  children: List(Node(msg)),
  acc: List(Focused(msg)),
) -> List(Focused(msg)) {
  1. This method is too long for me to decipher what it does

https://github.com/bgwdotdev/shore/blob/3accb647c98ebca04d7472ffa7abc6a377887224/src/shore/internal.gleam#L230C1-L233C49

fn shore_loop(
  state: State(model, msg),
  event: Event(msg),
) -> actor.Next(State(model, msg), Event(msg)) {

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions