Post History
Haskell + hgl, 9 bytes fe"abipq" Attempt This Online! This is the obvious solution and it's pretty much unbeatable. I also tried this solution avoiding the hardcoded string: 27 bytes ('x'&g...
#1: Initial revision
# [Haskell](https://www.haskell.org) + [hgl](https://www.codeberg.org/wheatwizard/haskell-golfing-library), 9 bytes
```txt
fe"abipq"
```
[Attempt This Online!](https://ato.pxeger.com/run?1=m708I7E4OzUnZ8FNxczcgvyiEoXC0sSczLTM1BSFgKLUnNKUVC6oRMDS0pI0XYvVabZpqUqJSZkFhUoQkZtKuYmZeQq2Cin5XAoKBUUKKgppOQppCtHqieoKenoK6lXqsRCVCxZAaAA)
This is the obvious solution and it's pretty much unbeatable.
I also tried this solution avoiding the hardcoded string:
### 27 bytes
```txt
('x'>)+fe[7,8,15]<dgs 16<Or
```
* `Or`: convert to character point.
* `dgs 16`: take the digital sum base 16.
* `fe[7,8,15]`: check if it is either 7, 8, or 15.
* `('x'>)`: check the input is also less than `'x'`.
Obviously this approach is nowhere near as short as the obvious approach but it's a little fun. (Anyone want to suggest adding `<x>` to the HTML standard?)
## Reflection
* There is the enduring issue that `fe` is way more useful than `e`. There names should be swapped. This would save a byte in both answers.
* `(+)` as a lifted and exists, and there is a lifted or, but it's way longer. `(*)` should act as a lifted or. Meaning at the very least `Predicate a` should have a `Rig` instance. If this were the case we could do:
```txt
eq 'i'*fe[7,8]<dgs 16<Or
```
Which saves 3 bytes in the long answer.
* There could be hard-coded variants for common digital sums. It's pretty much random chance that the number used here (16) is a power of two, but numbers from 2-11 plus 16, 32, and 64 are probably wise to have.
