Create and run the functions in the debug window

Assignment Help Programming Languages
Reference no: EM131181733

This is using Allegro CL (LISP)

1. Start Allegro CL
In the Debug Window you will see the following prompt:
CG-USER(1):

2. Enter the following text: (defun hello () (write-string "Hello, Everyone!"))
You should then see the following:
HELLO
CL-USER(2):

3. Run your function by entering: (hello)
Hopefully you will see the following in the window:
Hello, Everyone!
"Hello, Everyone!"
CL-USER(3):

4. Create and run the following functions in the Debug Window. Do not close the Debug Window yet.

a. goodbye: It should print "bye", "good bye", "farewell" or some other word.

b. middle-name: Accepts a full name as an argument and returns the middle name. This name can be represented as a list. For example, if you execute the program by entering "(middle-name ‘(Mary Jane Doe))" the output should be "Jane".

c. second-of-second: Accepts a list of lists as an argument and returns the second element of the second list. For example, if you run the function by entering (second-of-second ‘((a b c) (1 x) (e f))') the output should be "x".

d. repeater: letting the user specify the number of times to print the text in an argument. Suppose you create the function to print the text "AI"

If the function accepts arguments one should be able to execute it by entering (repeater x), where x is an integer. Entering (repeater 4) should produce this output:
AI
AI
AI
AI
e. adder: Prompts the user to enter 4 numbers and print the sum to the console. To run this function, one should only have to enter (adder).

Reference no: EM131181733

Questions Cloud

An employees contribution to his employers success : Descnbe one expenence you had in which an employees contribution to his or her employers success was positive and one in which it was negative.
Find the number of comparisons using binary : Write a program to find the number of comparisons using binarySearchand the sequential search algorithm as asked below.
The source of presidential power : "The Source of Presidential Power," After reviewing Neustadt's ideas, apply them to the role of a CEO. What lessons can the CEO learn from reading Neustadt clearly? Illustrate specifically how a CEO could implement Neustadt's principles to help the f..
What might be some drawbacks of this way of thinking : In what ways is it useful to think of knowledge, trust, motivation, and the like as though they were similar to productive machinery? What might be some drawbacks of this way of thinking?
Create and run the functions in the debug window : Create and run the following functions in the Debug Window. Do not close the Debug Window yet -
Ccutious about going to work for a small business : What factor or factors would make you cautious about going to work for a small business?- Could these reasons for hesitation be overcome? How?
Discuss cheap and safe substitute for the use of fossil fuel : Do you think that a cheap and safe substitute for the use of fossil fuels in cars will ever be found? Discuss. (Note that the electricity for electric cars is currently generated primarily by fossil fuels.)
Describe significant health issue in your community or state : Describe a significant health issue in your community or state. Compare its significance to the national priorities of Healthy People 2020 goals (is it a national priority or just one found in your state/community).
In what ways is the workforce becoming more diverse : In what ways is the workforce becoming more diverse.- and how do these changes affect recruitment by small companies?

Reviews

Write a Review

Programming Languages Questions & Answers

  Write a haskell program to calculates a balanced partition

Write a program in Haskell which calculates a balanced partition of N items where each item has a value between 0 and K such that the difference b/w the sum of the values of first partition,

  Create an application to run in the amazon ec2 service

In this project you will create an application to run in the Amazon EC2 service and you will also create a client that can run on local machine and access your application.

  Explain the process to develop a web page locally

Explain the process to develop a Web page locally

  Write functions

These 14 questions covers java class, Array, link list , generic class.

  Programming assignment

If the user wants to read the input from a file, then the output will also go into a different file . If the user wants to read the input interactively, then the output will go to the screen .

  Write a prolog program using swi proglog

Write a Prolog program using swi proglog

  Create a custom application using eclipse

Create a custom Application Using Eclipse Android Development

  Create a application using the mvc architecture

create a application using the MVC architecture. No scripting elements are allowed in JSP pages.

  Develops bespoke solutions for the rubber industry

Develops bespoke solutions for the rubber industry

  Design a program that models the worms behavior

Design a program that models the worm's behavior.

  Writing a class

Build a class for a type called Fraction

  Design a program that assigns seats on an airplane

Write a program that allows an instructor to keep a grade book and also design and implement a program that assigns seats on an airplane.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd