Skip to content

Instantly share code, notes, and snippets.

Ígor Bonadio igorbonadio

Block or report user

Report or block igorbonadio

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View lambda-calculus.rkt
#lang racket
(module+ test
(require rackunit))
; boolean
(define @true (lambda (t) (lambda(f) t)))
(define @false (lambda (t) (lambda(f) f)))
(define (->boolean boolean) ((boolean #t) #f))
(module+ test
@igorbonadio
igorbonadio / alignment2.hs
Created Apr 8, 2016
Needleman-Wunsch algorithm implementation in Haskell (tail recursive version)
View alignment2.hs
import Data.Array
import Data.List
import Data.Ord
fromBlosum :: Char -> Int
fromBlosum a = case elemIndex a "ARNDCQEGHILKMFPSTWYVBJZX" of
Just i -> i
Nothing -> error "Invalid amino acid"
toBlosum :: Int -> Char
@igorbonadio
igorbonadio / alignment.hs
Created Apr 8, 2016
Needleman-Wunsch algorithm implementation in Haskell
View alignment.hs
import Data.Array
import Data.List
import Data.Ord
fromBlosum :: Char -> Int
fromBlosum a = case elemIndex a "ARNDCQEGHILKMFPSTWYVBJZX" of
Just i -> i
Nothing -> error "Invalid amino acid"
toBlosum :: Int -> Char
You can’t perform that action at this time.