Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type inference for keyed children modifier #84

Open
armanbilge opened this issue Sep 19, 2022 · 2 comments
Open

Type inference for keyed children modifier #84

armanbilge opened this issue Sep 19, 2022 · 2 comments
Labels
UX Improve usability of an existing feature

Comments

@armanbilge
Copy link
Owner

Really interesting ideas from @kubukoz:

type ElemOfS[A] =
  A match {
    case fs2.Stream[_, a] => a
  }

type ElemOfL[A] =
  A match {
    case List[a] => a
  }

children[ElemOfL[ElemOfS[stream.type]]] <-- stream
@armanbilge armanbilge added the enhancement New feature or request label Sep 19, 2022
@kubukoz
Copy link
Contributor

kubukoz commented Sep 19, 2022

Another idea we discussed, for posterity:

case class Data(id: Int, text: String)

val stream: Stream[IO, List[Data]]

children <-- stream.map {
  _.map(data => data.id -> div(data.text))
}

@armanbilge
Copy link
Owner Author

Ah yes, I think I serialized that in #85 :)

@armanbilge armanbilge added UX Improve usability of an existing feature and removed enhancement New feature or request labels Feb 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
UX Improve usability of an existing feature
Projects
None yet
Development

No branches or pull requests

2 participants