-
-
Notifications
You must be signed in to change notification settings - Fork 197
Open
Description
stdlib/src/gleam/dynamic.gleam
Lines 320 to 329 in d8f046a
pub fn list( | |
of decoder_type: fn(Dynamic) -> Result(inner, DecodeErrors), | |
) -> Decoder(List(inner)) { | |
fn(dynamic) { | |
use list <- result.try(shallow_list(dynamic)) | |
list | |
|> list.try_map(decoder_type) | |
|> map_errors(push_path(_, "*")) | |
} | |
} |
I think it would be nice to return the index of the offending element instead of just "*"
I'm new to gleam, but I had a little play around trying to implement this and could open a pull request..
Metadata
Metadata
Assignees
Labels
No labels