Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Challenges

Post History

66%
+2 −0
Challenges Single letter HTML

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...

posted 5mo ago by WheatWizard‭

Answer
#1: Initial revision by user avatar WheatWizard‭ · 2026-04-15T20:51:52Z (5 months ago)
# [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.