@@ -51,8 +51,8 @@ struct FieldNameDict{
5151 end
5252end
5353function FieldNameDict {T} (key_entry_pairs:: Pair{<:T} ...) where {T}
54- keys = unrolled_map (pair -> pair[ 1 ] , key_entry_pairs)
55- entries = unrolled_map (pair -> pair[ 2 ] , key_entry_pairs)
54+ keys = unrolled_map (first , key_entry_pairs)
55+ entries = unrolled_map (last , key_entry_pairs)
5656 return FieldNameDict (FieldNameSet {T} (keys), entries)
5757end
5858
@@ -466,7 +466,7 @@ parent of the first entry in `dict` that is a `Fields.Field`. If no such entry
466466is found, `target_type` defaults to `Number`.
467467"""
468468function get_scalar_keys (dict:: FieldMatrix )
469- first_field_idx = unrolled_findfirst (x -> x isa Fields. Field, dict. entries)
469+ first_field_idx = unrolled_findfirst (Base . Fix2 ( isa, Fields. Field) , dict. entries)
470470 target_type = Val (
471471 isnothing (first_field_idx) ? Number :
472472 eltype (parent (dict. entries[first_field_idx])),
@@ -597,7 +597,7 @@ function check_diagonal_matrix(matrix, error_message_start = "The matrix")
597597 ! is_diagonal_matrix_entry (pair[2 ])
598598 end
599599 non_diagonal_entry_keys =
600- FieldMatrixKeys (unrolled_map (pair -> pair[ 1 ] , non_diagonal_entry_pairs))
600+ FieldMatrixKeys (unrolled_map (first , non_diagonal_entry_pairs))
601601 isempty (non_diagonal_entry_keys) || error (
602602 " $error_message_start has non-diagonal entries at the following keys: \
603603 $(set_string (non_diagonal_entry_keys)) " ,
@@ -611,7 +611,7 @@ Checks whether the `FieldNameDict` `dict` contains any un-materialized
611611`AbstractBroadcasted` entries.
612612"""
613613is_lazy (dict) =
614- unrolled_any (entry -> entry isa Base. AbstractBroadcasted, values (dict))
614+ unrolled_any (Base . Fix2 ( isa, Base. AbstractBroadcasted) , values (dict))
615615
616616"""
617617 lazy_main_diagonal(matrix)
0 commit comments