(ns utyped1)
(defn id identity)
(ns ^:core.typed typed
(:require [clojure.core.typed :as t]
[^{:require-typed
{id (t/All [x] [x -> x])}}
utyped1 :as u]))
(t/ann fidentity
(All [[x :< [Int -> Int]]] [x -> x]))
(def fidentity identity)
; (fn [X]
; (fn [a :- X]
; ((inst identity X) a))))
(deftype [X] Cons [fst rst]
PCons
(first [this] ((inst u/id X) fst))
(ns untyped
(:require [typed :as tt]))
;; t/fidentity considered [[Int -> Int] -> Any]
(t/fidentity (cast (fn [a] a) [Int -> Int]))