jrs's triangle code learn