could you help me a little bit pls?
I would like to make a frame with parameters x y f , x and y means volume, f means function.
The frame should be made from "#" and interior should be also made by "#" but it depends on predictate/function f.
For example:
Code: Select all
(make-pic 5 8 (lambda (m n) nil))
########
# #
# #
# #
########
NIL
Code: Select all
(make-pic 4 4 #’<)
####
# ##
# #
####
NIL
Code: Select all
(defun make-pic (a b function)
(dotimes (x b)
(format T "#"))
(format T "~%")
(dotimes (x (- a 2))
(format T "#")
(dotimes (x (- b 2))
(format T "a") /////////here should be some function, which will print the correct output
)
(format T "#")
(format T "~%"))
(dotimes (x b)
(format T "#")))
Code: Select all
Output
##########
#aaaaaaaa#
#aaaaaaaa#
##########
NIL
guys, any ideas please?