This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# OPTIONS_GHC -Wall #-} | |
module Main where | |
import Log | |
parse :: String -> [LogMessage] | |
parse xs = map parseMessage $ lines xs | |
parseMessage :: String -> LogMessage | |
parseMessage = createLog . words |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <string.h> | |
#include <errno.h> | |
#include <stdlib.h> | |
#include <math.h> | |
// Eu poderia ter simplesmente feito str[i] < '0', mas com ZERO_CHAR é mais cool 😎 | |
#define ZERO_CHAR 48 | |
#define NINE_CHAR 57 |