Started adding purely functional defs for DP LCS solution