Question: Why am I getting this error string - trim: undefined; cannot reference an identifier before its definition? ( define ( valid - whoozit? s )
Why am I getting this error "stringtrim: undefined;
cannot reference an identifier before its definition"?
define validwhoozit? s
and stringref s #x
stringlength s
stringcontains s y
define validwhatzit? s
and stringref s #q
stringlength s
or stringcontains s z
stringcontains s d
validblurb? substring s
define validblurb? s
cond stringempty? s #t
validwhoozit? s
validblurb? substring s stringlength match
validwhatzit? s
validblurb? substring s stringlength match
define main
display "Enter an alien word:
let loop
let input stringtrim read
if validblurb? input
display "The word is fine."
begin
display "The word is a mess!"
newline
loop
main
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
