problem from: https://web.archive.org/web/20200718175929/http://www.pathwayslms.com/swipltuts/dcg/
Use a dcg to convert a sparse sequence like
[0,0,0,0,0,0,7,4,3,0,0,0,0,0,0,0,8,9,14,0,0,0,0....]to
[zero(6), 7,4,3, zero(7), 8,9,14, ...]
i feel like i understand the material on this page up to here but don't really know how to start this one. any pointers would be appreciated
Try doing something like this:
Example: