Clean, 57 bytes
import StdEnv,Text
$b#[u,v:_]=split"/"b
=v==""<+10^size u
This one is a little shorter but breaks for large numerator/denominators.
Clean, 77 61 60 58 bytes
-1 thanks to OMᗺ's tip on my other answer
import StdEnv,Text
$b#[u,v:_]=split"/"b
=1<+[48\\_<-:u]==v
This uses Neil's method, it's a bit shorter than doing it directly.
There's some trickery with conversion overloading, where 1<+[48\\_<-:u]
converts [Int]
to [Char]
and then to {#Char} (:== String)
, but Int
directly to String
.
Clean, 91 89 bytes
import StdEnv,Text
t=toInt
$a b#[b,c:_]=map t(split"/"b)
#d=t(a<+b)
=d/c==t a&&d-d/c*c==b
Defines a function $ :: String String -> Bool
which extracts the numerator and denominator, string-concatenates the integer part and the numerator, and checks equivalence.