   (apply-kwargs read-csv-rows (clojure.string/split-lines csv-str) opts))
 
 
+
+;; ## Some parsing functions for your convenience
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+; These functions can be imported and used in your `:cast-fns` specification
+
+(defn ->int
+  "Translating string into integers"
+  [string]
+  (Integer/parseInt string))
+
+(defn ->float
+  "Translate into float"
+  [string]
+  (Float/parseFloat string))
+
+

                                      (re-find comment-re %))
                                    (when remove-empty
                                      (re-find #"^\s*$" %)))
                               lines-iter)
        header (first (csv/read-csv (first non-cmnt-lines)))
        non-cmnt-lines (rest non-cmnt-lines)]
    (map

; ## Higher level CSV parsing functionality
;
; The most popular CSV parsing libraries for Clojure presently -- `clojure.data.csv` and `clojure-csv` -- are really focused on handling the _syntax_ of CSV;
; They take CSV text and transform it into collections of row vectors of string values, providing a minimal translation into the world of data.
; Semantic CSV takes it the next step by giving you tools for addressing the _semantics_ of your data, helping you put it into the form that better reflects what it means, and what's most useful for you.
;
; ## Features
; 
; To be less abstract about it, `semantic-csv` lets you easily:
; 
; * Absorb header row as a vector of column names, and return remaining rows as maps of `column-name -> row-val`
; * Write from a collection of maps, given a pre-specified `:header`
; * When reading, apply casting functions on a column by column basis (for casting to ints, floats, etc) via `:cast-fns`
; * When writing, apply formatting functions on a column by column basis via `:format-fns`, when `str` won't cut it
; * Remove lines starting with comment characters (by default `#`)
; * An optional "sniffer" that reads in N lines, and uses them to guess column types (SOON)
;
; ## This namespace...
;
; ...is the core of the API.


(ns semantic-csv.core
  (:require [clojure.java.io :as io]
            [clojure.data.csv :as csv]))
