Class FromList


  • public class FromList
    extends PrimitiveFunction
    Creates a map from a list of pairs.
    • Constructor Detail

      • FromList

        public FromList()
    • Method Detail

      • name

        public Name name()
        Get the name of this primitive function.
        Specified by:
        name in class PrimitiveFunction
        Returns:
        the name
      • apply

        public static <K,​V> PersistentMap<K,​V> apply​(ConsList<Pair<K,​V>> pairs)
        Apply the function to its single argument.
        Type Parameters:
        K - the key type
        V - the value type
        Parameters:
        pairs - the list of key-value pairs
        Returns:
        a map constructed from the pairs
      • apply

        public static <K,​V> PersistentMap<K,​V> apply​(java.util.List<Pair<K,​V>> pairs)