KX Community

Find answers, ask questions, and connect with our KX Community around the world.
KX Community Guidelines

Home Forums kdb+ Challenge 1 – Triangle Font Re: Challenge 1 – Triangle Font

  • SJT

    Member
    March 19, 2024 at 10:55 am

     

    q){x#’x}1+til 4

    ,1

    2 2

    3 3 3

    4 4 4 4

    q)tf:{x#’x}1+til ::

     

    Breaking it down

    1. 1+til gives us the natural numbers to whatever
    2. {x#'x} gives us N of each N
    3. Suffixing the three unaries with :: gives us the composition to be known as tf

    Nice challenge! Who would like to come to another Vector Dojo?