Haskell: After zipping the lists together I\'m trying to access the int that is
ID: 3765548 • Letter: H
Question
Haskell:
After zipping the lists together I'm trying to access the int that is associated with the char value. So if I say position 'X' it should return 33. the problem with the code below is that it returns [33] which is a list of the int I want. Any help would be greatly appreciated. Remember I want the return to be of type Int and not of type [Int].
Example:
Main> position 'X'
[33]
position x = [i | (x',i) <- createKey, x==x']
createKey :: [(Char, Int)]
createKey = zip (['0'..'9']++['A'..'Z']) ([0..35])