Merge a map/filter Fun.id with filter_map
This commit is contained in:
@@ -35,8 +35,8 @@ let is_valid_target tgt nums ops =
|
||||
| [] -> List.exists (( = ) 0) tgts
|
||||
| h :: t ->
|
||||
impl
|
||||
(List.map (fun tgt -> List.map (fun op -> op tgt h) ops) tgts
|
||||
|> List.concat |> List.filter_map Fun.id)
|
||||
(List.map (fun tgt -> List.filter_map (fun op -> op tgt h) ops) tgts
|
||||
|> List.concat)
|
||||
t
|
||||
in
|
||||
impl [ tgt ] nums
|
||||
|
Reference in New Issue
Block a user