1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
VARVARA [1.3K]
4 years ago
15

Write and test the definition of a haskell function 'largest', which finds the largest element of a list, but is implemented usi

ng higher-order functions and/or operator sections as appropriate.
Computers and Technology
1 answer:
Kaylis [27]4 years ago
3 0
Largest :: [a] -> (a -> a -> Ordering) -> a largest (x:xs) cmp = go x xs where go largest [] = largest go largest (x:xs) = case cmp largest x of LT -> go x xs _ -> go largest xs

You might be interested in
List three considerations when you choose memory.
liq [111]
1)How many memory cards (how many can you computer hold)
2)Company (some companies run better than others)
3)Amount of memory (xGb)
8 0
3 years ago
ask user to input a string. (assume length of input string is 1) If the string is lower case, print its upper case If the string
Helga [31]

Answer:

import java.util.*;

import java.util.Scanner;

class Main

{

public static void main(String[] args) {

System.out.println("Enter String");

Scanner sc1=new Scanner(System.in);

String s1= sc1.nextLine();

boolean b= isNumerc(s1);

if (b== true)

{

    System.out.println("Its number: Sorry");

}

else

{

boolean a=isStringUpperCas(s1);

if(a == false)

{

    System.out.println(s1.toUpperCase());

}

else

{

    System.out.println(s1.toLowerCase());

}

}

}

private static boolean isStringUpperCas(String st1){

     

     

      char[] arr = st1.toCharArray();

     

      int k =0; boolean flag=true;

      while(k<arr.length)

      {

         

          if( Character.isUpperCase( arr[k] ))

          {

              flag=true;

              k++;

          }

          else

          {

              flag=false;

              k++;

          }

         

      }

      return flag;

}

             

  public static boolean isNumerc(final String st1) {

     

      if (st1 == null || st1.length() == 0) {

          return false;

      }

      for (char ch : st1.toCharArray()) {

          if (!Character.isDigit(ch)) {

              return false;

          }

      }

      return true;

  }

 

}

Explanation:

Please find the program above.

8 0
3 years ago
Information systems security is the collection of activities that protect the information system and the data stored in it.
ivann1987 [24]

Answer:

The answer is A. True.

Explanation:

Information systems security,refers to all the methods involved with assuring information integrity as well as keeping it confidential, and available.

It can also be defined as -

The detection and provisoon of solutions to security breaches.

Access controls, which prevents unauthorized system access.

Protection of information either in transit or in a storage area.

3 0
3 years ago
How to learning algothrim bett
Stells [14]
The GCSE Computing MOOC (created with Cambridge University Press and Raspberry Pi) can be used either as a course or a flexible teaching resource,
8 0
4 years ago
As you type your outline, click Demote to move a line of text
polet [3.4K]
<span>C. out one level. i hope this helps</span>
5 0
4 years ago
Read 2 more answers
Other questions:
  • One critique of determining the effectiveness of the psychodynamic perspective is that its theories are too vague to test. t/f
    14·2 answers
  • When a computer restarts without a hardware power-down-power-up cycle, it is doing a _______________?
    9·1 answer
  • A(n) ________ collects data from various key business processes and stores the data in a single comprehensive data repository, u
    11·1 answer
  • Regarding computer protection, quarantining is defined as ________.
    9·1 answer
  • Assume you are part of the systems development team at a medium-sized organization. The database will enable sales reps to have
    8·1 answer
  • 1.in 3 sentences explain briefly what are the examples of the advantage of using multimedia approach in a slide presentation bra
    8·1 answer
  • Select the statement which most accurately describes the benefits and drawbacks of working from home and telecommuting.
    13·2 answers
  • What is the final step when creating an appointment to ensure that the content of the appointment is stored in Outlook?
    13·1 answer
  • The science of how an object reacts to its motion through air is called _______________. (12 letters)
    13·2 answers
  • Which slideshows design can not be use?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!