Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4013524
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T09:22:55+00:00 2026-05-20T09:22:55+00:00

I know the basic algorithm for this problem but I am having trouble changing

  • 0

I know the basic algorithm for this problem but I am having trouble changing the sentence into a list inside my conditional. I created make-list to make it easier on myself but I’m not sure where to put it in the code. For ex, in the first cond statement, I need the sentence to be a list before I check if the first element in the sentence is a vowel.. but I have been doing it syntactically wrong.

vowel-ci? returns #t if a character is a case insensitive vowel, and #f otherwise.

stenotype takes a sentence and returns it with all vowels removed.

(define make-list
   (lambda (string)
     (string->list string)))

(define stenotype
  (lambda (sentence)
    (cond
      [(vowel-ci? (car sentence)) (stenotype (cdr sentence))]
      [else (cons (car sentence) (stenotype (cdr sentence)))])))
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T09:22:56+00:00Added an answer on May 20, 2026 at 9:22 am

    There are a few different tasks (preparing input so it can be processed by your implementation and the processing itself), which you’ve broken into two different functions. The next step is combining the functions, rather than rewriting the latter to use the former. The simplest way of combining functions is composition. Compose make-list and stenotype (you may wish to name this composition) and you’ll have your solution.

    (define double
        (lambda (x) (* x 2)))
    
    (define inc
        (lambda (x) (+ x 1)))
    
    ; one option: define a new function that's a composition    
    (define double-inc
        (lambda (x) (inc (double x))))
    
    ; another option: compose the functions when you use them
    (inc (double 23))
    
    ; yet another option: make the other functions local to the composition
    ; Useful if the other functions are subordinate to the composition, and 
    ; aren't useful outside of it. You often see this with recursive functions,
    ; where the outer function sets up a call to the recursive function
    (define (double-inc x)
        (define (double x) (* x 2))
        (define (inc x) (+ x 1))
      (inc (double x)))
    
    (define (max numbers)
        (define (max-recur maximum numbers)
          (cond ((eq? numbers '()) maximum)
                ((< maximum (car numbers)) (max-recur (car numbers) (cdr numbers)))
                (else (max-recur maximum (cdr numbers)))))
      (max-recur (car numbers) (cdr numbers)))
    

    Note that you’re missing a base case in stenotype to end the recursion.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Know this might be rather basic, but I been trying to figure out how
I know this maybe a basic question but I just can't seem to find
I'm not expert about css menus. But I know basic system to make css
I do know some basic differences but there are still some questions in my
I'm trying to improve my current algorithm for the 8 Queens problem, and this
This might come across as a silly question but I am curious to know
This is not a homework question, but rather my intention to know if this
I want to know the basic principle used for WYSIWYG pages on the web.
Do you know what basic information MUST include a paragraph ( <w:p/> ) in
Although I know the basic concepts of binary representation, I have never really written

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.