{-# LANGUAGE FlexibleContexts #-}
module Data.Fixpoint.Algorithms (
  size
) where

import Data.Fixpoint.Base

import Data.Foldable as F

size :: (Fixpoint t, Foldable (Pre t)) => t -> Int
size = cata (F.foldr (+) 1)