Skip to main content
Commonmark migration
Source Link

#Haskell, 85 bytes

Haskell, 85 bytes

My first submission, it will probably be the longest (85 bytes) but hey, you got to start somewhere. In Haskell:

import Numeric;f=('#':).concatMap((flip showHex)"".(15-).fst.head.readHex.(:[])).tail

It's using the same subtract from 15 trick I saw other people use.

I also tried using printf along with the other trick (subtract 8^8 - 1) and it works in ghci but for some reason it doesn't compile:

g=printf "#%06x" .(8^8-1-).fst.head.readHex.tail

If someone could make this work that would be great!

#Haskell, 85 bytes

My first submission, it will probably be the longest (85 bytes) but hey, you got to start somewhere. In Haskell:

import Numeric;f=('#':).concatMap((flip showHex)"".(15-).fst.head.readHex.(:[])).tail

It's using the same subtract from 15 trick I saw other people use.

I also tried using printf along with the other trick (subtract 8^8 - 1) and it works in ghci but for some reason it doesn't compile:

g=printf "#%06x" .(8^8-1-).fst.head.readHex.tail

If someone could make this work that would be great!

Haskell, 85 bytes

My first submission, it will probably be the longest (85 bytes) but hey, you got to start somewhere. In Haskell:

import Numeric;f=('#':).concatMap((flip showHex)"".(15-).fst.head.readHex.(:[])).tail

It's using the same subtract from 15 trick I saw other people use.

I also tried using printf along with the other trick (subtract 8^8 - 1) and it works in ghci but for some reason it doesn't compile:

g=printf "#%06x" .(8^8-1-).fst.head.readHex.tail

If someone could make this work that would be great!

#Haskell, 85 bytes

My first submission, it will probably be the longest (85 bytes) but hey, you got to start somewhere. In Haskell:

import Numeric;f=('#':).concatMap((flip showHex)"".(15-).fst.head.readHex.(:[])).tail

It's using the same subtract from 15 trick I saw other people use.

I also tried using printf along with the other trick (subtract 8^8 - 1) and it works in ghci but for some reason it doesn't compile:

g=printf "#%06x" .(8^8-1-).fst.head.readHex.tail

If someone could make this work that would be great!

My first submission, it will probably be the longest (85 bytes) but hey, you got to start somewhere. In Haskell:

import Numeric;f=('#':).concatMap((flip showHex)"".(15-).fst.head.readHex.(:[])).tail

It's using the same subtract from 15 trick I saw other people use.

I also tried using printf along with the other trick (subtract 8^8 - 1) and it works in ghci but for some reason it doesn't compile:

g=printf "#%06x" .(8^8-1-).fst.head.readHex.tail

If someone could make this work that would be great!

#Haskell, 85 bytes

My first submission, it will probably be the longest (85 bytes) but hey, you got to start somewhere. In Haskell:

import Numeric;f=('#':).concatMap((flip showHex)"".(15-).fst.head.readHex.(:[])).tail

It's using the same subtract from 15 trick I saw other people use.

I also tried using printf along with the other trick (subtract 8^8 - 1) and it works in ghci but for some reason it doesn't compile:

g=printf "#%06x" .(8^8-1-).fst.head.readHex.tail

If someone could make this work that would be great!

Source Link

My first submission, it will probably be the longest (85 bytes) but hey, you got to start somewhere. In Haskell:

import Numeric;f=('#':).concatMap((flip showHex)"".(15-).fst.head.readHex.(:[])).tail

It's using the same subtract from 15 trick I saw other people use.

I also tried using printf along with the other trick (subtract 8^8 - 1) and it works in ghci but for some reason it doesn't compile:

g=printf "#%06x" .(8^8-1-).fst.head.readHex.tail

If someone could make this work that would be great!