Inspired by, and in memory of, my dear friend and colleague,
#Inspired by, and in memory of, my dear friend and colleague,
Dan Baronet
#Dan Baronet , 1956 – 2016. R.I.P.
Dan Baronet , 1956 – 2016. R.I.P.
He found the shortest possible APL solution to this task:
Task
Given a Boolean list, count the number of trailing truth values.
Example cases
{} → 0
{0} → 0
{1} → 1
{0, 1, 1, 0, 0} → 0
{1, 1, 1, 0, 1} → 1
{1, 1, 0, 1, 1} → 2
{0, 0, 1, 1, 1} → 3
{1, 1, 1, 1, 1, 1} → 6
#Inspired by, and in memory of, my dear friend and colleague,
Dan Baronet
#Dan Baronet , 1956 – 2016. R.I.P.
He found the shortest possible APL solution to this task:
Task
Given a Boolean list, count the number of trailing truth values.
Example cases
{} → 0
{0} → 0
{1} → 1
{0, 1, 1, 0, 0} → 0
{1, 1, 1, 0, 1} → 1
{1, 1, 0, 1, 1} → 2
{0, 0, 1, 1, 1} → 3
{1, 1, 1, 1, 1, 1} → 6
Inspired by, and in memory of, my dear friend and colleague,
Dan Baronet , 1956 – 2016. R.I.P.
He found the shortest possible APL solution to this task:
Task
Given a Boolean list, count the number of trailing truth values.
Example cases
{} → 0
{0} → 0
{1} → 1
{0, 1, 1, 0, 0} → 0
{1, 1, 1, 0, 1} → 1
{1, 1, 0, 1, 1} → 2
{0, 0, 1, 1, 1} → 3
{1, 1, 1, 1, 1, 1} → 6
#Inspired by, and in memory of, my dear friend and colleague,
Dan Baronet
#Dan Baronet, 1956 – 2016.R.I.P.
He found the shortest possible APL solution to this task:
Task
Given a Boolean list, count the number of trailing truth values.
Example cases
{} → 0
{0} → 0
{1} → 1
{0, 1, 1, 0, 0} → 0
{1, 1, 1, 0, 1} → 1
{1, 1, 0, 1, 1} → 2
{0, 0, 1, 1, 1} → 3
{1, 1, 1, 1, 1, 1} → 6
#Inspired by, and in memory of, my dear friend and colleague,
Dan Baronet
#Dan Baronet, 1956 – 2016.
He found the shortest possible APL solution to this task:
Task
Given a Boolean list, count the number of trailing truth values.
Example cases
{} → 0
{0} → 0
{1} → 1
{0, 1, 1, 0, 0} → 0
{1, 1, 1, 0, 1} → 1
{1, 1, 0, 1, 1} → 2
{0, 0, 1, 1, 1} → 3
{1, 1, 1, 1, 1, 1} → 6
#Inspired by, and in memory of, my dear friend and colleague,
Dan Baronet
#Dan Baronet, 1956 – 2016.R.I.P.
He found the shortest possible APL solution to this task:
Task
Given a Boolean list, count the number of trailing truth values.
Example cases
{} → 0
{0} → 0
{1} → 1
{0, 1, 1, 0, 0} → 0
{1, 1, 1, 0, 1} → 1
{1, 1, 0, 1, 1} → 2
{0, 0, 1, 1, 1} → 3
{1, 1, 1, 1, 1, 1} → 6
#Inspired by, and in memory of, my dear friend and colleague,
Dan Baronet
#Dan Baronet, 1956 – 2016.
He found the shortest possible APL solution the shortest possible APL solution to this task:
Task
Given a Boolean list, count the number of trailing truth values.
Example cases
{} → 0
{0} → 0
{1} → 1
{0, 1, 1, 0, 0} → 0
{1, 1, 1, 0, 1} → 1
{1, 1, 0, 1, 1} → 2
{0, 0, 1, 1, 1} → 3
{1, 1, 1, 1, 1, 1} → 6
#Inspired by, and in memory of, my dear friend and colleague,
Dan Baronet
#Dan Baronet, 1956 – 2016.
He found the shortest possible APL solution to this task:
Task
Given a Boolean list, count the number of trailing truth values.
Example cases
{} → 0
{0} → 0
{1} → 1
{0, 1, 1, 0, 0} → 0
{1, 1, 1, 0, 1} → 1
{1, 1, 0, 1, 1} → 2
{0, 0, 1, 1, 1} → 3
{1, 1, 1, 1, 1, 1} → 6
#Inspired by, and in memory of, my dear friend and colleague,
Dan Baronet
#Dan Baronet, 1956 – 2016.
He found the shortest possible APL solution to this task:
Task
Given a Boolean list, count the number of trailing truth values.
Example cases
{} → 0
{0} → 0
{1} → 1
{0, 1, 1, 0, 0} → 0
{1, 1, 1, 0, 1} → 1
{1, 1, 0, 1, 1} → 2
{0, 0, 1, 1, 1} → 3
{1, 1, 1, 1, 1, 1} → 6