class RDF::N3::Algebra::List::First

Iff the subject is a list and the object is the first thing that list, then this is true. The object can be calculated as a function of the list.

@example

{ ( 1 2 3 4 5 6 ) list:first 1 } => { :test1 a :SUCCESS }.

The object can be calculated as a function of the list.

Constants

NAME
URI

Public Instance Methods

resolve(list) click to toggle source

Resolves this operator using the given variable ‘bindings`. If the last operand is a variable, it creates a solution for each element in the list.

@param [RDF::N3::List] list @return [RDF::Term] @see RDF::N3::ListOperator#evaluate

# File lib/rdf/n3/algebra/list/first.rb, line 20
def resolve(list)
  list.first
end