Play with syntax

This commit is contained in:
2023-12-04 19:05:20 +01:00
parent e746e22b0b
commit 53cad097f8
15 changed files with 27 additions and 26 deletions

View File

@@ -9,7 +9,7 @@ getCalibrationValuePart (h: _) | isDigit h = h
getCalibrationValuePart (_: t) = getCalibrationValuePart t
getCalibrationValue :: CalibrationLine -> Integer
getCalibrationValue line = read [getCalibrationValuePart line, getCalibrationValuePart (reverse line)]
getCalibrationValue line = read [getCalibrationValuePart line, getCalibrationValuePart . reverse $ line]
getCalibrationValues :: CalibrationDocument -> [Integer]
getCalibrationValues [h] = [getCalibrationValue h]