Search
 
SCRIPT & CODE EXAMPLE
 

ELIXIR

elixir check type data

defmodule Util do
    def typeof(a) do
        cond do
            is_float(a)    -> "float"
            is_number(a)   -> "number"
            is_atom(a)     -> "atom"
            is_boolean(a)  -> "boolean"
            is_binary(a)   -> "binary"
            is_function(a) -> "function"
            is_list(a)     -> "list"
            is_tuple(a)    -> "tuple"
            true           -> "idunno"
        end    
    end
end
Comment

PREVIOUS NEXT
Code Example
Elixir :: elixir ecto query to sql 
Elixir :: elixir replace string 
Elixir :: elixir change map key name 
Elixir :: elixir timex format 
Elixir :: elixir append lists 
Elixir :: elixir sleep 
Elixir :: elixir enum chunk_by 
Elixir :: elixir with else 
Scala :: scala length of string 
Scala :: scala option 
Scala :: How to have scalable images using image view xamarin XML 
Actionscript :: microsoft.visualstudio.web.codegeneration.design 3.1.0 
Actionscript :: dig WWW.EXAMPLE.COM +nostats +nocomments +nocmd 
Excel :: excel conditionally highlight rows based on column 
Excel :: select full column in excel 
Perl :: perl hash ref create 
Perl :: perl download images files 
Pascal :: begin in pascal 
Powershell :: Saved Windows Credentials 
Gdscript :: GAScript - Google Sheets - QBO API - Consent Dialogue Box 
Lisp :: random choice from list of strings in emacs lisp 
Assembly :: vba hello world 
Assembly :: re optional 
Javascript :: jquery vslidation remove spaces from input 
Javascript :: remove non letters from a string javascript 
Javascript :: window.reload 
Javascript :: javascript split and trim 
Javascript :: update node.js dependencies 
Javascript :: javascript to detect browser 
Javascript :: how to get element by title js 
ADD CONTENT
Topic
Content
Source link
Name
5+7 =