src/basilisp/lang/obj.py
def seq_lrepr(
    iterable: Iterable[Any], start: str, end: str, meta=None, **kwargs
) -> str:
    """Produce a Lisp representation of a sequential collection, bookended
    with the start and end string supplied. The keyword arguments will be
    passed along to lrepr for the sequence elements."""
    print_level = kwargs["print_level"]
    if isinstance(print_level, int) and print_level < 1:
        return SURPASSED_PRINT_LEVEL

    kwargs = _process_kwargs(**kwargs)

    trailer = []
    print_dup = kwargs["print_dup"]
    print_length = kwargs["print_length"]
    if not print_dup and isinstance(print_length, int):
        items = seq(iterable).take(print_length + 1).to_list()
        if len(items) > print_length:
            items.pop()
            trailer.append(SURPASSED_PRINT_LENGTH)
    else:
        items = iterable

    items = list(map(lambda o: lrepr(o, **kwargs), items))
    seq_lrepr = PRINT_SEPARATOR.join(items + trailer)

    print_meta = kwargs["print_meta"]
    if print_meta and meta:
        return f"^{lrepr(meta, **kwargs)} {start}{seq_lrepr}{end}"

    return f"{start}{seq_lrepr}{end}"
def seq_lrepr(
    iterable: Iterable[Any], start: str, end: str, meta=None, **kwargs
) -> str:
    print_level = kwargs["print_level"]
    if isinstance(print_level, int) and print_level < 1:
        return SURPASSED_PRINT_LEVEL

    kwargs = _process_kwargs(**kwargs)

    trailer = []
    print_dup = kwargs["print_dup"]
    print_length = kwargs["print_length"]
    if not print_dup and isinstance(print_length, int):
        items = seq(iterable).take(print_length + 1).to_list()
        if len(items) > print_length:
            items.pop()
            trailer.append(SURPASSED_PRINT_LENGTH)
    else:
        items = iterable

    items = list(map(lambda o: lrepr(o, **kwargs), items))
    seq_lrepr = PRINT_SEPARATOR.join(items + trailer)

    print_meta = kwargs["print_meta"]
    if print_meta and meta:
        return f"^{lrepr(meta, **kwargs)} {start}{seq_lrepr}{end}"

    return f"{start}{seq_lrepr}{end}"
def seq_lrepr ( iterable : Iterable [ Any ] , start : str , end : str , meta = None , * * kwargs ) -> str : print_level = kwargs [ "print_level" ] if isinstance ( print_level , int ) and print_level < 1 : return SURPASSED_PRINT_LEVEL kwargs = _process_kwargs ( * * kwargs ) trailer = [ ] print_dup = kwargs [ "print_dup" ] print_length = kwargs [ "print_length" ] if not print_dup and isinstance ( print_length , int ) : items = seq ( iterable ) . take ( print_length + 1 ) . to_list ( ) if len ( items ) > print_length : items . pop ( ) trailer . append ( SURPASSED_PRINT_LENGTH ) else : items = iterable items = list ( map ( lambda o : lrepr ( o , * * kwargs ) , items ) ) seq_lrepr = PRINT_SEPARATOR . join ( items + trailer ) print_meta = kwargs [ "print_meta" ] if print_meta and meta : return f"^{lrepr(meta, **kwargs)} {start}{seq_lrepr}{end}" return f"{start}{seq_lrepr}{end}"
Produce a Lisp representation of a sequential collection, bookended
    with the start and end string supplied. The keyword arguments will be
    passed along to lrepr for the sequence elements.
Produce a Lisp representation of a sequential collection bookended with the start and end string supplied . The keyword arguments will be passed along to lrepr for the sequence elements .