Return a `List` with all elements except the last one.

 @example
   Erlang::List["a", "b", "c"].init # => Erlang::List["a", "b"]

 @return [List]
195254
def init
      raise Erlang::ImproperListError if improper?
      return Erlang::Nil if tail.empty?
      out = tail = Erlang::Cons.allocate
      list = self
      until list.tail.empty?
        new_node = Erlang::Cons.allocate
        new_node.instance_variable_set(:@head, list.head)
        new_node.instance_variable_set(:@improper, false)
        tail.instance_variable_set(:@tail, new_node)
        tail.instance_variable_set(:@improper, false)
        tail.immutable!
        tail = new_node
        list = list.tail
      end
      if not tail.immutable?
        tail.instance_variable_set(:@tail, Erlang::Nil)
        tail.immutable!
      end
      return out.tail
    end
462922
def list(offset = 0, limit = 100, unread_only = true)
      api.get('', offset: offset, limit: limit, unreadOnly: unread_only)
    end
1058036
def list_strip(list_, to_strip, left=True, right=True):
    
    import utool as ut
    flags = [item != to_strip for item in list_]
    flag_lists = []
    if right:
        rstrip_flags = ut.cumsum(flags[::-1])[::-1]
        flag_lists.append(rstrip_flags)
    if left:
        lstrip_flags = ut.cumsum(flags)
        flag_lists.append(lstrip_flags)
    strip_flags = ut.and_lists(*flag_lists)
    stripped_list = ut.compress(list_, strip_flags)
    return stripped_list
231106
def dedupe_list(seq):
    
    seen = set()
    return [x for x in seq if not (x in seen or seen.add(x))]
435657
def last
      return nil if ! @map.last
      if @map.length == 1
        left = 0
      else
        left = @map[@map.length-2][0]+1
      end
      [@map.length-1,@map.last[1],left,@map.last[0]]
    end
1207509
def left(self, num=None):
        
        if num == None:
            return FlatList([_get_list(self)[0]])
        if num <= 0:
            return Null

        return FlatList(_get_list(self)[:num])
768613
function List(length) {
        if (arguments.length === 0) {
            length = 0;
        }

        // in this case we create a list with a given length
        if (arguments.length <= 1 && typeof length === 'number') {
            if (this instanceof List) {
                this.length = length;
            }
            else {
                return new List(length);
            }
        }
        else {
            //here we create a list with initial values
            if (!(this instanceof List)) {
                return List.fromArray(arrSlice(arguments));
            }
            else {
                for (var i = 0, l = arguments.length ; i < l ; i++) {
                    this[i] = arguments[i];
                }
                this.length = arguments.length;
            }
        }
    }
655461
function() {
            var returnType, list = [];
            for (var i = 0; i < arguments.length; i++) {
                var arg = arguments[i];
                if (isArray(arg.value)) {
                    returnType = returnType || arg.type;
                    arg = arg.value;
                }
                list = list.concat(arg);
            }

            return newLessList(list, returnType);
        }
189075
def flatten(L):
    
    if not isinstance(L, list):
        return [L]

    if L == []:
        return L

    return flatten(L[0]) + flatten(L[1:])
1146511
def bracketedList(l, r, sep, expr, allow_missing_close=False):
  
  # We may need to backtrack for lists, because of list comprehension, but not for
  # any of the other lists
  strict = l != '['
  closer = sym(r) if not allow_missing_close else p.Optional(sym(r))
  if strict:
    return sym(l) - listMembers(sep, expr) - closer
  else:
    return sym(l) + listMembers(sep, expr) + closer
1158174
def flatten_unique(l: Iterable) -> List:
    
    rval = OrderedDict()
    for e in l:
        if not isinstance(e, str) and isinstance(e, Iterable):
            for ev in flatten_unique(e):
                rval[ev] = None
        else:
            rval[e] = None
    return list(rval.keys())
612099
def select_from(list, text = 'Select the index', default_idx = 0, raw_list = list)
      error "list and raw_list differs in size" if list.size != raw_list.size
      l     = list
      raw_l = raw_list
      if list.is_a?(Array)
        l = raw_l = { 0 => 'Exit' }
        list.each_with_index do |e, idx|
          l[idx + 1] = e
          raw_l[idx + 1] = raw_list[idx]
        end
      end
      puts l.to_yaml
      answer = ask("=> #{text}", default_idx.to_s)
      raise SystemExit, 'exiting selection' if answer == '0'
      raise RangeError, 'Undefined index'   if Integer(answer) >= l.length
      raw_l[Integer(answer)]
    end
310476
def drop(number)
      raise Erlang::ImproperListError if improper?
      list = self
      while !list.empty? && number > 0
        number -= 1
        list = list.tail
      end
      return list
    end
942199
def exclude(*list, &block)
      @@exclusion << list.map { |s| "@#{s}".to_sym }
      @@exclusion.flatten!
      @@exclusion_block = block if block_given?
    end
1336618
def get_all(cls):
        '''  '''
        redis = cls.get_redis()

        return list(map(
            lambda id: cls.get(id),
            map(
                debyte_string,
                redis.smembers(cls.members_key())
            )
        ))
490265
public static String last(String list, String delimiter, boolean ignoreEmpty) {

	if (StringUtil.isEmpty(list)) return "";
	int len = list.length();

	char[] del;
	if (StringUtil.isEmpty(delimiter)) {
	    del = new char[] { ',' };
	}
	else del = delimiter.toCharArray();

	int index;
	int x;
	while (true) {
	    index = -1;

	    for (int i = 0; i < del.length; i++) {
		x = list.lastIndexOf(del[i]);
		if (x > index) index = x;
	    }

	    if (index == -1) {
		return list;
	    }

	    else if (index + 1 == len) {
		if (!ignoreEmpty) return "";
		list = list.substring(0, len - 1);
		len--;
	    }
	    else {
		return list.substring(index + 1);
	    }
	}
    }
1085351
function(list) {
            if (!isArray(list.value))
                return list;

            var listType, row, rowType;
            rowType  = list.type;
            list     = list.value;
            listType = list[0].type;
            row      = list[0].value;

            list = (isArray(row) ? row : [row]).map(function(col, i) {
                return newLessList(list.map(function(row) {
                    return (isArray(row.value)
                        ? row.value : [row])[i]
                            || new Node();
                }), rowType);
            });

            return newLessList(list, listType);
        }